This is an action on a bond given to Louis Voter, treasurer of the town of Farmington, to indemnifi^ the town against the costs in certain suits pending against it.
At the trial at nisi pr ins, the presiding justice ordered a non-suit on the ground that the action should have been brought in the name of the obligee.
The contract was under se^l. In such case none but a party can maintain an action upon it. Flynn v. N. A. Life Ins. Co. 115 Mass. 449. The legal title is in the obligee, and the action must be in his name. When the bond is for the use of the town, *418but running to the commonwealth, no action can be maintained in the name of the town, though the forfeiture will accrue to its benefit. Inhabitants of North Hampton v. Elwell, 4 Gray, 81. An action on a contract with the warden of the state prison of Maine in his name, cannot be maintained in the name of the state. State of Maine v. Gould, 11 Met. 221.
Where the contract is by an agent or servant and not under seal, suits have been sustained in the name of the parties for whose use and benefit they were made. It is otherwise when they are under seal. Ministerial and School Fund v. Parks, 1 Fairf. 441; Garland v. Reynolds, 20 Maine, 45.
Nonsuit confirmed.
Barroívs, DaNfoeth, Virgin, Peters and Staionds, JJ., concurred.