This case comes before the court upon a petition of the inhabitants of Cambridge and Somerville, praying for a writ of mandamus to the Charlestown Branch Rail Road Company, requiring them to erect a bridge over a certain highway, lying partly in one and partly in the other of those towns, and thereby save those towns from the expense of erecting such bridge.
It appears by the petition, that the highway in question was formerly a section of a turnpike road, called the Middlesex Turnpike ; but that the portion of such turnpike lying in Cambridge, and in that part of Charlestown since incorporated into a new town by the name of Somerville, was called and known by the name of Hampshire Street. This is admitted by the answer. The petition sets forth the grounds upon which the petitioning towns insist that it is the duty of the respondents to build this bridge. The respondents appeared and filed their answer, by which they admitted the facts as set forth, but denied their lia bility to build such bridge, and declared their intention not to do so, unless as a duty imposed on them by law. And the question is, whether they are under such legal obligation.
The Charlestown Branch Rail Road Company were authorized, by St. 1841, c. 108, passed on the 17th of March 1841, to extend their rail road, from its intersection with the Lowell *71road, northwesterly through Cambridge, crossing the road in question. By § 4, they were invested with all the powers and privileges, and made subject to all the duties, liabilities, and provisions contained in the 39th chapter of the revised statutes, and other statutes relating to rail road corporations.
At the same session of the legislature, and four days prior to the passage of the above act, an act was passed (St. 1841, c. 78) dissolving the Middlesex Turnpike Corporation, and accepting the surrender of their charter, (which was granted by St. 1805, c. 12,) to take effect on the 1st day of June following. By that act, it was provided, among other things, that said turnpike road, except so much as then already had been, or before said 1st of June should be, laid out and established as a town or county road, should be discontinued.
It further appears by the petition and answer, that the said section of the old Middlesex Turnpike was not laid out as a town or county road, before the said 1st day of June, but that the same remained, in fact, an open way, and was used as a convenient private way, by all those proprietors owning lands adjacent to it, and, without restraint, by all other persons having occasion to use it; that in January 1842, a petition was presented to the county commissioners for the county of Middlesex, praying that the same might be laid out as a public highway ; and that such proceedings were had thereon, that at a session of said commissioners, held in September 1842, the same was so laid out as a public highway, and the inhabitants of Cambridge and Somerville respectively, through which towns the same passed, were ordered to construct and complete the same, and to erect a bridge over the track of the Charlestown Branch Rail Road, where such road crosses the same, of the length, dimensions and construction in said order particularly set forth. It further appears, by the record of said commissioners, that this county road was laid out by the same lines, and of the same width, with that section of the old Middlesex Turnpike ; that they awarded no damage to any person over whose lands the same passed, because, in their judgment, no person sustained any by the laying out of said road.
*72We are then to consider whether, under these circumstances, it was the duty of the respondents to erect, or be at the expense of erecting, this bridge, or whether that duty devolves upon the towns of Cambridge and Somerville.
The respondents, by accepting the franchise conferred on them by the act of the legislature, on certain conditions, became bound to the performance of all conditions and stipulations therein contained, on their part to be performed, to the same extent as if they were thereto bound by covenant. Among these duties are to be included those imposed by the general provisions respecting rail roads embraced in the revised statutes. By the Rev. Sts. c. 39, §§ 66, 72, it is provided, that if any rail road shall be so laid out as to cross any turnpike road or other way, it shall be so made as not to obstruct such way ; and the corporation shall maintain and keep in repair all bridges, with their abutments, which such corporation shall construct over or under any such way. Wherever, therefore, the rail track and the public way cannot cross each other on the same level, there must oe a bridge, either for the way over the rail road track, or for that track over the way; and in either case, it is the duty of the corporation to build such bridge, because necessary to avoid obstructing the way, which they are bound not to do. And where, in the exercise of this duty, the rail road corporation build a bridge for the way, over the rail road, the statute makes it their duty to keep the same in repair.
Had the Middlesex Turnpike continued, or had the same been laid out as a town or county road, before the 1st of June 1841, it is very clear that it would have been the duty of the corporation to construct and maintain the Bridge in question, without reference to the terms of the act by which this exten sion of their franchise was granted. But it ceased to be a pub lie way legally established, though a public way de facto, from June 1841 to September 1842 ; and this circumstance gives rise to the question. The respondents contend, that the highway now existing, called Hampshire Street, commenced in September 1842, after their rail road was located and established, and therefore that it was the duty of those who were bound to *73construct the way and fit it for travel, to construct the bridge necessary for the travel to pass over their road. Were there no provisions in the legislative act, under which the corporation claim their franchise, bearing on this point, there would certainly be great weight in the argument of the respondents. We are then brought to the consideration of those provisions, and their legal effect upon the rights of the parties, taken, as they must be, with reference to the facts and circumstances as they then existed. It was competent for the legislature to grant the franchise upon any terms which might seem to them necessary and expedient for the public safety and convenience, or just and equitable in regard to individuals. They might require that bridges should be built over private as well as public ways, or even require that a bridge should be built where there was no way before, for the use of an individual proprietor, in order to connect one part of his farm with another, and thus diminish the damage occasioned by passing through his land. All such conditions, whatever s may be the motive of the legislature in inserting them, become binding on the corporation by their acceptance of the franchise. In the act of 17th March 1841 St. 1841, c. 108, § 1, in describing the extension, the right to which is granted to the corporation, it is put down as follows: “ Thence to the intersection of Hampshire Street with the Milk Row road; thence in Cambridge, crossing under said Hampshire Street,” &c. In a subsequent part of the act, <§> 5, it is provided that in crossing certain roads named, amongst others Hampshire Street, “ the said rail road shall pass under bridges. In crossing other roads or avenues, the said company shall, in the construction of the rail road, adopt such safeguards for the security of the public, as the county commissioners shall deem proper.” Here is an express condition, that in crossing Hampshire Street, the road now in question, the rail road shall pass under a bridge ; and by the general rail road law, as before stated, when it is necessary that the rail road should pass under a bridge, it is the duty of the corporation to construct and maintain such bridge, and the abutments connected with it.
But it is contended, in behalf of the respondents, that although *74this provision was a requisition upon them, absolute in its terms, yet there was a condition, by necessary implication,"that the way called Hampshire Street should continue, without interruption, to be a public way, either as a turnpike road, or a county or town road; and as it had ceased to be either, at the time when their road was located and constructed, they were thereby exempted from this duty. But we are unable to perceive, in the circumstances of the case, any such implied exception. The act providing for the discontinuance of the Middlesex Turnpike had passed a few days previously. It was therefore known and understood by the legislature that, as a turnpike, it would cease to be a public highway on the 1 st of June next ensuing. Yet no qualification was annexed to the duty imposed on the corporation to build a bridge over it. If any such exception had been intended, there seems to be no reason why it was not expressed. Besides ; there seems to be no sufficient reason why the duty to build this bridge should be made to depend on its being continued a public way without interruption. The Middlesex Turnpike had been an open public highway thirty five years. It may be presumed that buildings had been erected, and improvements made, by the adjacent proprietors of land, in reference to the use of the road as a way, public or private, and that it would be continued in some form ; and if not laid out as a town or county road, that they would continue it for their own benefit. In that case, it was competent to the legislature to provide for the erection of a bridge over the rail road, in order to continue the use and enjoyment of such way to the proprietors; it would be an equitable interpretation in their behalf, which, it may be well presumed, was intended by the legislature. Or, as it had long been in use by the public, as a turnpike and highway, it might be presumed that .t would soon be laid out, by the county or town authorities, as a public way ; in which case, all the considerations of policy and equity, which would require the corporation to construct and maintain a bridge over an actually existing road, would apply to a road existing de facto, and contemplated to be legally established. In point of fact, soon after the discontinuance of this *75section of road as a turnpike, an application was made to the county commissioners to lay it out as a highway; and as speedily as it could be done according to the usual course of proceeding, where various corporations and persons are to have notice and be heard, the highway was established. In doing so, the commissioners seem to regard it rather as the restoration of a public easement in a new form, than as a wholly new proceeding. They lay it out according to the same lines exactly as the turnpike, and they award no damages to any of the proprietors. This may have been either because the proprietors had already been paid for a perpetual public easement in their land, and so not equitably entitled to damage; or because it was a benefit to them, exceeding the damage, in consequence of having their buildings and improvements adapted to its use. In either case, it must have been regarded, in substance, rather as a revival and continuance of an existing easement, than as the commencement of a new one, although the only form, in which the commissioners could act upon it, was by laying it out as a new public highway. These considerations strongly rebut the presumption of any implied exception to the obligation imposed on the corporation by the absolute requisition on them to build this bridge, and confirm the conclusion to be derived from the terms of the act, that the obligation to build this bridge was intended by the legislature to be an absolute, and not a conditional one.
But one argument has been urged by the respondents, which deserves consideration. It is said, that at the time when the rail road was located and constructed, the turnpike had been discontinued, the new road had not been laid out, and of course the land over which the way had passed, had become private property, and that the corporation could not enter upon it and erect a bridge and abutments, without committing a trespass. To this we think there are two answers. The first is, that, as it continued during the same time an open way de facto, used by the proprietors of the adjoining lands, and by others, and as it was apparently for the benefit of the proprietors, their consent was to be presumed until some dissent was shown; and as the re*76spondents did not ask for a license to enter, or offer to enter and build the bridge, but on the contrary denied, and still deny, their obligation to do it, we think it is no excuse now to say that if a license had been asked, it might have been refused, and they might have been regarded as trespassers. The other answer is, that although the law would not require the respondents to do an unlawful act, by trespassing on the land of private proprietors, yet that would only suspend, and not wholly take away, the obligation of the respondents to perform this duty. Suppose a rail road act had required the corporation to erect and maintain a bridge over their road, at a place designated, for the benefit of a particular proprietor, and his heirs and assigns, and the proprietor, in possession at the time of the location and construction of the road, should refuse the corporation his consent to their entering his land, to build the bridge: but afterwards the same estate should become the property of other owners, by descent or purchase. If such successors should tender the corporation a license, and request them to build the bridge, we are strongly inclined to the opinion, that the corporation would be bound to the performance of such duty; the obligation having been suspended, but not abrogated. But in this case no offer was made by the corporation, no license was refused by the proprietors, and it cannot be presumed that it would have been refused; because the act was for their benefit, and because, very shortly after the rail road was located, Hampshire Street was laid out as a public way, and then there was nothing to hinder the corporation from entering and building the bridge. We are of opinion that they were not absolved from their legal obligation, although at the time of the location and construction of their rail road, the soil of Hampshire Street was technically private property.
One other consideration may be briefly referred to, namely, that this duty of building the bridge was imposed by the county commissioners on the towns of Cambridge and Somerville, and therefore it belongs to them, and not to the respondents, to perform it. As between the commissioners and the towns, this was the only course which they could pursue; they *77having no authority to impose any obligations on the rail road corporation. But if the corporation were under a prior obligation to perform the same duty, and that, in effect, was an obligation to these towns, because it was to meet an expense which they would otherwise be obliged to meet, then these towns do perform their duty, by requiring it to be done by those who are bound to them by law to do it. It is as if they had taken a covenant or bond of indemnity from the respondents, that in case these towns should be required to build such bridge, the respondents would build it, and save the towns harmless.
On the whole, the court are of opinion, that the rail road corporation were under a legal obligation to build the bridge in question over their road, and that-the petitioning towns have such an interest in the performance of this duty, that they are proper parties to come into court, to obtain suitable process for requiring its performance ; and as there is no other suitable and adequate legal remedy for securing its performance, a writ of mandamus may be properly issued, directed to the respond ent corporation, requiring them forthwith to erect and con struct a bridge over their rail road, whfere it crosses Hampshire Street, with suitable abutments and slopes, in general conformity to the orders and directions given by the county commissioners, in their decree laying out said public highway.
Writ of mandamus ordered
Buttrick, for the petitioners.
J. Dana, for the respondents