If a department, commission, board, officer, employee or agent of the commonwealth is about to expend money or incur obligations purporting to bind the commonwealth for any purpose or object or in any manner other than that for and in which such department, commission, board, officer, employee or agent has the legal and constitutional right and power to expend money or incur obligations, the supreme judicial or superior court may, upon the petition of not less than 24 taxable inhabitants of the commonwealth, not more than 6 of whom shall be from any 1 county, determine the same in equity, and may, before the final determination of the cause, restrain the unlawful exercise or abuse of such right and power.
Mass. Gen. Laws ch. 29, § 63