delivered the opinion of the court.
The appellants contend, first, that the court had no authority to make the decision; that the proceeding was wholly irregular, without proper pleadings, and coram non judice. This objection- hardly comes with a good grace from the appellants,"Who all joined in submitting the question to the court. But the jurisdiction was undoubted. A court of equity, in a suit for the foreclosure of a mortgage, clearly has cognizance of all questions relating to priority of Hen on the property in litigation, as between the parties to the suit and those whom they lawfully represent. The mode in •which the'jurisdiction shall be exercised is not so mucha matter of substance as of form. Ordinarily a reference to a master before the final decree would be the formal method to pursue, but where, from oversight or other cause, this has been omitted, the parties may certainly agree (as was done hero) to submit the matter to the court, upon a statement of facts, after the decree.
The appellants contend, in the next place, that the decision . upon the facts was erroneous; that the mortgages, being prior in date to the bond given for the purchase-money of these locoriiotives and cars, and being expressly made to include after-acquired property, attached to the property a3 soon as it was purchased, and displaced any junior lien. This, we- apprehend, is an erroneous view* of the doctrine by which after-acquired property is made to serve the uses of a mortgage. . That doctrine is intended to subserve the purposes of justice, and not injustice. Such an application •of it as is sought by the appellants would often result in *365 gross injustice. A mortgage intended to cover after-ae-, quired property can only attach itself to such property in the condition in which it comes into-the mortgagor’s hands. If that property is already subject to mortgages or other liens, the general riiortgage does not displace then?, though they rqay be junior to it in point of time. It only attaches to such interest as the mortgagor acquires; and if he pur- ■ chase property and give a mortgage for.tlje purchase-money, the deed which he receives and the mortgage which he gives are regarded as one transaction, and no general lien impending over him, whether- in the shape of a general mortgage, qT judgment, or recognizance, can displace such mortgage for purchase-money. And in such cases a failure to register the mortgage for purchase-moneymakes no difference. It ’does not come within the reason of the registry laws. These laws are inteuded for the protection of subsequent, not prior, purchases’s and creditors.
Had the property sold by the government to the railroad company been rails, as in the case of the Galveston Railroad Company v. Cowdrey, or any other material which became affixed to and a part of the principal thing, the result would have been different. But being loose property, susceptible of'separate ownership and separate liens, such liens, if binding on the railroad company itself, are unaffected by a prior general mortgage given by the company, and paramount thereto.
In the case before us, the United States, at the timé of making the sale, reserved a lien on the property, and imposed a.condition of non-alienation until the price should be paid. Taken all together the transaction amounts to a transfer sab modo, and the lion must be regarded as attaching to the property itself, and as paramount to any other liens arising from the prior act of the company.
Decree affirmed.
