The first question presented in this case is whether the petitioner has become the absolute owner of the rails and tracks laid by the street railway company and now lying on and embedded in the surface of one of the public streets. He purchased all the property of the company at a sale properly made by duly appointed receivers of the company, and the receivers made a proper transfer to him. It is provided by R L. c. 112, § 12, that “A receiver of the property of a street railway company may, by order of the court,. sell and transfer the road and property of such company, its locations and franchises, on such terms and in such manner as the court may order. The purchasers from such receiver, and a corporation organized under the provisions of the following section, if such road has been transferred to it, shall hold and possess said road, all its rights and franchises and all property acquired in connection therewith, with the same rights and privileges and subject to the same duties and liabilities as the original street railway company; but no action shall be brought against such purchaser or such new corporation, to enforce any liability incurred by said original corporation, except debts and liabilities owing from said original corporation to any city or town within which the road is operated and taxes and assessments for which said original corporation is liable under the statutes relating to street railways, which shall be assumed and paid by said new corporation. The provisions of this section shall not impair the powers of the holders of an outstanding mortgage to enforce their rights by suit or otherwise.”
Section 13 of the same chapter provides that the purchasers at such a sale shall within sixty days thereafter organize a corporation for the purpose of holding, owning and operating the street railway purchased, and that if they fail to organize such *526a corporation in the manner therein prescribed, all rights and powers to operate the road shall thereupon cease. The respondent contends that the petitioner, never having organized or intended to organize such a corporation, and never having intended in anyway to operate the street railway or cause it to be operated, but having made his purchase for the purpose only of removing and. selling the rails, was not such a purchaser as is contemplated by the statute, and did not acquire any right to the property.
We think however that the titlé to the property sold by the receivers did pass to the petitioner. It may be granted that the sections of the statute to which we have referred contemplate the continued operation of a street railway which has been sold under the authority that they give. But no such requirement is made in terms; and the provision in § 13 that upon failure to form a corporation to hold and operate the railway the right and power to operate it shall cease, is far from being tantamount to a provision that the purchasers shall suffer the further penalty of being deprived of the property which they have bought and paid for. ' The receivers have full power to make the sale; it is their duty to do so when ordered by the court which has appointed them; they have no right or duty to inquire into and no means of ascertaining the motives or intentions of bidders or purchasers. We are of opinion accordingly that the petitioner is the absolute owner of the property in question.
But his right to remove the rails and other materials which are embedded in the surface of the public street, and for that purpose to break and dig up the street depends upon other considerations. It has been decided by this court that these rails and materials remain personal property. Lorain Steel Co. v. Norfolk & Bristol Street Railway, 187 Mass. 500. But they were laid by a street railway company in pursuance of a location granted to it and accepted by it and with the obligation to operate its road and thus to perform certain public duties ; and they cannot be removed without digging up the surface of the street and making the public highway, at any rate partially and temporarily impassable. The petitioner does not contend that he has any right to remove the rails if he or the voluntary associaztion which he represents is under any duty to operate this line *527as a street railway; and accordingly it becomes necessary to determine whether he is now under such a duty.
A street railway company, like a railroad corporation, has no power to alienate its franchise without permission of the Legislature. Richardson v. Sibley, 11 Allen, 65. Our earliest statute upon this subject provided that “no street railway corporation shall sell or lease its road or property unless authorized so to do by its charter, or by special act of the Legislature.” St. 1864, c. 229, § 24. And “ any alienation, either in fee, or for the period of its corporate existence, or for any less term, of substantially all its real and personal property, so as to disable it from carrying on the business which it had been chartered to do for the benefit of the public, is clearly within the terms and meaning of this prohibition.” Gray, J. in Richardson v. Sibley, ubi supra. And subject to certain limitations not material to the decision of this case, the same prohibition has since remained in force (Pub. Sts. c. 113, § 56; St. 1897, c. 269; it. L. c. 112, §§ 85 et seqi), except that in 1900 power was given to the receiver of a street railway company to make such a sale of its road, property, locations and franchises as is here in question. St. 1900, c. 381. E. L. c. 112, §§ 12-14. The petitioner’s rights accordingly depend upon the provisions of these sections.
The respondent contends that as it is expressly provided by § 12 that the purchasers at such a sale “ shall hold and possess said road, all its rights and franchises and all property acquired in connection therewith, rvith the same rights and privileges and subject to the same duties and liabilities as the original street railway company,” and by § 13 that they shall within a limited time organize a corporation for the purpose of holding, owning and operating the street railway, they are under the same obligation to operate the railway and to carry passengers as rested upon the original company; and that this obligation can be terminated only by an order of the board of aldermen or selectmen ordering the street to be cleared of the tracks under R. L. c. 112, § 36, or revoking the location under R. L. c. 112, § 32. Springfield v. Springfield Street Railway, 182 Mass. 41,48. But under the last clause of § 13, the petitioner has now no right or power to operate a street railway over these tracks; and we cannot construe the statute as continuing the existence *528of this duty after its performance has been forbidden by the very terms of the statute. The language of these sections is indeed mandatory; but looking at the object to be attained, .the realization of all the property of an insolvent corporation for the payment of its debts, considering the fact that the penalty imposed for the failure of the purchasers to organize a corporation and operate the railway is merely the loss of the right and power to carry on such operation, and the practical impossibility of continuing to operate a railway whose gross receipts are insufficient to meet its operating expenses, we are of opinion that the petitioner is'not now under any duty to use, these tracks for the operation of a street railway.
We have then the case of an owner of personal property which is so embedded in the surface of a public way that it cannot be removed without breaking and digging up the surface. This way is situated in Waltham; and the ordinances of that city provide that “No person, unless authorized by law, shall break or dig up any part of any street, or erect thereon any staging for building, or place thereon any lumber, brick, or other building materials without a written license from the superintendent of streets. Any person intending to erect or repair any building upon land abutting upon a street shall give notice to the superintendent of streets, who may, at the owner’s request, set apart such portion of the street as he may deem expedient for such use. Such person shall, when required by the superintendent of streets, construct and maintain a suitable sidewalk around the obstruction, and shall, before the expiration of his license, remove all rubbish and restore such street to its former condition, to the satisfaction of the superintendent of streets. Every person so. licensed shall, in writing, agree to indemnify the city against all damage or loss to the city accruing from the doing of any act or thing under such license, and sureties may be required in the discretion of the superintendent of streets, and every person who, when so licensed, shall obstruct or render unsafe any public street or sidewalk, shall guard the / same by a proper fence or railing and by lights during the night time, subject to the approval of the superintendent of streets. Such license may be revoked at any time by the superintendent of streets.” Without a license granted by the superintendent *529of streets under this section, the petitioner cannot break or dig up any part of the way, and so cannot remove these rails. They have a value for resale of more than $6,000; but they are valueless to the petitioner unless they can be removed. The operation of a street railway line over these tracks never has produced, and there is no reason to believe that it ever could produce, sufficient income to pay the bare expenses of operation. The petitioner has made proper application to the respondent, who is superintendent of streets of the city of Waltham, for a license to take up these rails, and the respondent has refused and refuses to grant it. It has been found at the hearing before a single justice of this court that the respondent’s refusal to issue the license did not result from the exercise of his judgment or discretion as to the proper care of the streets, or from the adverse determination of any question connected with such care or with the protection of the public travel, but from a desire to keep the rails in the streets in the hope that some person or corporation would operate street cars over them; and that the rails could have been removed and could now be removed without any permanent injury to the street or unreasonable disturbance of public travel. The petitioner asks this court to issue a mandamus commanding the respondent to grant such a license to the petitioner.
The office of superintendent of streets in Waltham is created by the charter of that city, St. 1898, c. 361, § 36, which provides that he “ shall have the powers of a surveyor of highways and all the powers of road commissioners not herein otherwise conferred.” He is charged with the duty of seeing that the streets are kept safe and convenient for travel; and he is to exercise his best judgment and discretion for the performance of this duty. He is vested with the power of determining in any particular case whether or not a license shall be issued to authorize the digging up of any part of a street or the erection thereon of any staging for building, the placing thereon of any building materials, or the temporary use of any portion of the street for the erection or repair of buildings abutting thereon. Many occasions may arise when either public or private interests or both would be seriously affected by his issuing or refusing to issue such a license; and it is for him to consider in each case *530the nature and magnitude of the interests involved, the extent and probable duration of any interference with public travel and the effect which may be produced upon the structure or paving of the way, and to determine whether or not, in view of all the circumstances and in the proper exercise of his discretion as a public officer charged with the care of the streets, the license asked for ought to be granted. This he has not done in the case at bar, but has refused to issue the license prayed for merely from a hope and desire which ought not to have influenced his decision. He has not heard and determined the petitioner’s application in the manner in which he ought to have heard and determined it; and we have no doubt that a mandamus properly may issue to compel him to do so. Osborn v. Selectmen of Lenox, 2 Allen, 207. Dodge v. County Commissioners, 3 Met. 380. Nourse v. Merriam, 8 Cush. 11. It was his duty to hear and consider this application without regard to other considerations than those which we have stated, and not to base bis action upon any such desire as has guided him. People v. Supervisors of Delaware County, 45 N. Y. 196. State v. St. Louis, 145 Mo. 551. He has a right to refuse to grant the license asked for if in the proper exercise of his judgment and official discretion he decides that it ought not to be granted; but he has not the right to refuse it merely for a reason which lies outside the scope of his duty. Similar questions have often arisen in other jurisdictions ; and, so far as we are aware, this doctrine always has been maintained. Laclede Gras Light Co. v. Murphy, 170 U. S. 78. In re Excise License, 38 N. Y. Supp. 425. People v. Supervisors of Herkimer County, 56 Barb. 452. People v. Perry, 13 Barb. 206. State v. Commissioners of Warren County, 17 Ohio St. 558. Zanone v. Mound City, 103 Ill. 552. Gulick v. New, 14 Ind. 93. Harwood v. Quinby, 44 Iowa, 385. Mobile Ins. Co. v. Cleveland, 76 Ala. 321. State v. Lutz, 136 Mo. 633. State v. Shannon, 133 Mo. 139. State v. Barnes, 25 Fla. 298. Stockton & Visalia Railroad v. Stockton, 51 Cal. 328. Thomas v. Armstrong, 7 Cal. 286. Regina v. Fawcett, 11 Cox C. C. 305. The King v. Justices of Cumberland, 4 Ad. & El. 695.
But the petitioner contends that he is entitled to a mandamus commanding the respondent to issue the license prayed for. He contends that in acting upon such an application the superin*531tendent of streets performs a purely ministerial duty, that his discretion goes no further than to see that proper indemnity is given to the city against any damage or loss and that proper precautions are taken-against accident, and to determine whether sureties shall be required from the licensee. But we have been referred to no authority in the statutes or ordinances for such a contention; and we are not aware that support can be found for it in any judicial decision. It has indeed been held that one who has an absolute and paramount right to do an act which necessarily involves the digging up of public streets may by mandamus compel the officers who are charged with the care of the streets to allow him to exercise that absolute right in a proper manner and with suitable safeguards. Commonwealth v. Warwick, 185 Penn. St. 623. State v. St. Louis, 145 Mo. 551. State v. Latrobe, 81 Md. 222. In the case at bar, however, no such absolute right can be found to exist. The petitioner bought the property with full notice of its character and position, and knowing that his power to remove it depended upon his ability to obtain a license from the superintendent of streets. It well may be that this officer cannot refuse a license upon wholly immaterial reasons or from mere wantonness or caprice; and that is all that was decided in People v. Keating, 55 App. Div. (N. Y.) 555, People v. Collis, 17 App. Div. (N. Y.) 448, and Laclede Gras Light Co. v. Murphy, ubi supra. And it may be that he would not have the right to shut his eyes to proved facts, and rest a decision upon an alleged failure to find such facts, as was held in Stockton & Visalia Railroad v. Stockton, ubi supra, though there might be a practical difficulty in reviewing his action in such a case. But none of these decisions support the petitioner’s present contention.
We are of opinion that the correct rule to be followed in such, a case as this, was declared in Keough v. Aldermen of Holyoke, 156 Mass. 403. It appeared in that case that the petitioner had been duly elected collector of taxes for the city of Holyoke, but the board of aldermen denied his right to the office, claimed that another person had been elected, and upon that ground refused to accept the petitioner’s official bond; and it was held that he was entitled to a writ of mandamus, declaring that he had been duly elected, and commanding the board of aldermen *532to consider the bond presented by him, and to accept or reject it as it might or might not be found to be satisfactory to them and in the form required by law, but that, although the board had put their refusal to accept his bond directly upon the ground that he had not been duly elected, yet they could not be required to accept his bond, for the reason that the bond must be in such sum as they should require and with sureties to their satisfaction. It is true that in that case the record of the board of aldermen had subsequently been amended by adding the statement that their refusal to accept the bond was for other reasons also; but the court in its opinion (p. 408) declined to pass upon the validity of this amendment, and rested its decision upon the general ground which has been stated. The same doctrine is affirmed in the well reasoned opinion of the court in State v. Latrobe, 81 Md. 222, relied on by the petitioner, in which it is expressly declared that whenever the performance of a duty is dependent upon the exercise of judgment and discretion on the part of the person to whom its performance is assigned, that judgment and discretion will not be interfered with or controlled by the writ of mandamus, and this for the reason that there is no warrant of law justifying the substitution of the judgment of the court for the judgment and discretion of the individual exclusively entrusted with the performance of that particular duty. To the same effect are Lunt v. Davison, 104 Mass. 498; Rice Machine Co. v. Worcester, 180 Mass. 575; Deehan v. Johnson, 141 Mass. 28; Provident Savings Society v. Cutting, 181 Mass. 261; Rice v. Middlesex Highway Commissioners, 13 Pick. 225; Ipswich, petitioner, 24 Pick. 343; Prickett’s ease, Spencer, (N. J.) 134; High, Extraordinary Legal Remedies, §§ 80, 88, 91, 92, 97.
It is not necessary to consider in detail the different requests for rulings which were made by the petitioner. They are all disposed of by what has been said. In our opinion, the petitioner is entitled to have a writ of mandamus issue, commanding the respondent, as he is superintendent of streets of the city of Waltham, to hear and determine the petitioner’s application without regard to any hope or desire that some person or corporation will operate street cars over the tracks in question, but exercising in the manner hereinbefore stated his sound discre* *533tion as an officer charged with the care of the streets, in view of the fact that the petitioner is the owner of the property in question and is not under any duty to use it for the operation of street cars.
So ordered.