This recognizance was clearly void, having been taken by a magistrate in a case where he had no jurisdiction. The defendant was brought before a justice of the peace who was an inhabitant of Framingham, upon a complaint charging him with being a common seller of intoxicating liquors at Framingham, contrary to the provisions of St. 1852, c. 322, § 12; and was thereupon ordered to recognize to appear at the next criminal term of the court of common pleas, to answer to an indictment, and to all such matters and things as should be objected against him in behalf of the Commonwealth. The present action is upon that recognizance. By § 9 of this statute “ the forfeitures of all recognizances given in pursuance of this act shall go to the town or city where the offence was committed.”
Without entering upon the consideration of other cases of forfeitures, and the extent to which the town where the offence was committed has actually a legal interest in them, it is sufficient for the present case that the forfeiture of the debt upon this recognizance would enure to the benefit of the town of Framingham. The case falls therefore directly within the principle of the case *428of Pearce v. Atwood, 13 Mass. 324. In the present case, as in that, the justice had, as an inhabitant and taxpayer in Framingham, an interest, however minute it might be, in the fruits of the'recognizance he took.
The exceptions to the rule are, 1. Where, from the peculiar circumstances of the case, as in criminal districts having by law but one tribunal, or one or more magistrates alike interested, and from the necessity of the case, it must be taken that the statute creating the tribunal had virtually declared that such interest should not in such cases oust the court of jurisdiction, and thus wholly defeat the operation of the law. Hill v. Wells, 6 Pick. 104. Commonwealth v. Ryan, 5 Mass. 90. Commonwealth v. Emery, 11 Cush. 406. 2. This objection of an interest in the forfeitures may be removed by direct legislation, by statutes so providing, as has been done in certain cases. St. 1815, c. 103. Rev. Sts. c. 90, § 124. Such statutes have been deemed valid by this court. Commonwealth v. Reed, 1 Gray, 474, and previous cases there cited.
But where no such direct and express legislation has taken place, and where, from the character of the tribunal, as was the case in the present instance—inasmuch as any justice for the county of Middlesex, other than one residing in Framingham, could properly take the jurisdiction of the case—no necessity exists for having jurisdiction assumed by an inhabitant of the town where the offence was committed; if such jurisdiction is assumed, any acts done under it are void. The result is that this recognizance cannot be enforced, nor any forfeiture be incurred under it.
Judgment for the defendants.