While the defendants may be correct in their contention that the decision as to which bidder was the lowest responsible and eligible bidder under G. L. c. 30, § 39M, was a question of fact to *912be decided by the awarding authority rather than the court, see Capuano, Inc. v. School Bldg. Comm. of Wilbraham, 330 Mass. 494, 496 (1953); Modern Continental Constr. Co. v. Massachusetts Port Authy., 369 Mass. 825, 829 (1976), it is nevertheless clear from the cases cited that the awarding authority’s determination may be reviewed on allegations that it was made illegally, arbitrarily, or in bad faith. Such allegations are contained in the complaint, as are certain circumstances elaborating the bad faith (compare Mass.R.Civ.P. 9[b], 365 Mass. 751 [1974]); and it cannot be said that " 'there is no set of facts which the plaintiff could prove in support of [its] claim which would entitle [it] to relief.’ ” White v. Spence, 5 Mass. App. Ct. 679, 683 (1977). The judge therefore erred in allowing the defendants’ motions to dismiss the complaint under Mass.R.Civ.P. 12(b)(6), 365 Mass. 755 (1974), for failure to state a claim on which relief can be granted.
Steven J. Comen for the plaintiff.
Walter G. Bilowz for the town of Pepperell.
Judgment reversed.