delivered the opinion of the court, November 20th 1876.
It Avas held in Fowler v. Scully, 22 P. F. Smith 456, that the loaning of money by a national bank upon mortgage or other real estate security is ultra vires, and forbidden by the Act of Congress. This of course does not apply to the case where a bank has in good fiiith taken a mortgage by way of security for a previously existing debt. Such case comes Avithin one of the express exceptions of the Act of Congress. It follows, therefore, that in so far as the mortgage of Mrs. McAboy to the Peoples’ National Bank of Pittsburgh was given to secure money thereafter to be loaned to her husband, it Avas ultra vires. It is manifest from the evidence that the loan of $8000 to Mr. McAboy on or about the 8th of September 1870, was upon the faith of the mortgage. As to this loan the mortgage was not a valid security. But it Avas good as to the indebtedness of Mr. McAboy to the bank existing prior to its execution, amounting to about $12,055. Eor $7000 of this sum the bank held the endorsements of the plaintiff in error. His contention is that the bank was bound to apply the money received from a sheriff’s sale of the mortgaged premises to the notes held by it at the time the mortgage was given. In this Ave think he is right. As the endorser of Mr. McAboy’s notes, held by the bank, he had a right to call upon the latter to apply the money to the payment of the notes for which alone the mortgage was legally held as security. The mortgage was as much for his benefit as for the *59bank. The latter ha no right to apply the proceeds thereof to the two unsecured notes of $4000 each. Under the authority of Fowler v. Scully, supra, Mr. McAboy could have objected to such appropriation. Whatever he might have done in this respect, the plaintiff in error as his endorser may do also.
From what has been said it will be seen that both the assignments of error are sustained. The judgment is reversed, and a venire facias de novo awarded.