
338 Pa. Superior Ct. 211 (1985)
487 A.2d 929
COMMONWEALTH of Pennsylvania, DEPARTMENT OF PUBLIC WELFARE, and John A. Fulmer, Sr., Assignee, Real Party in Interest
v.
Charles E. ANDREWS and Ella Andrews, His Wife, and Ida E. Andrews, Heir, and Viola Statler, Terre Tenant and Helen Shafer, Terre Tenant
Appeal of John A. FULMER, Sr.
Supreme Court of Pennsylvania.
Argued October 17, 1984.
Filed January 25, 1985.
Petition for Allowance of Appeal Denied August 5, 1985.
*213 Gene F. Roscioli, Easton, for appellant.
William P. Hogan, Easton, for appellees.
Before WIEAND, DEL SOLE and POPOVICH, JJ.
POPOVICH, Judge:
This is an appeal from the Order of the Court of Common Pleas of Northampton County entered on May 27, 1983. We affirm.
The factual context within which this dispute arose is complex. Ella Andrews died in 1967 leaving six children as beneficiaries under her will. At the time of her death, she owned a dwelling encumbered by three liens in favor of the Commonwealth of Pennsylvania, Department of Public Welfare. After her death, the real property and dwelling house became vested in her six children or the issue thereof surviving. In 1979, one of her children, Ida, died intestate and without heirs which caused her one-sixth interest to combine with that of her siblings or their issue. Ultimately, the land came to be composed of undivided one-fifth interests. In 1980, John A. Fulmer, Sr., appellant, purchased an undivided three-fifths interest in that property; however, he was relegated to filing an action for specific performance against the remaining undivided two-fifths owners, namely appellee-terre tenants[1] herein, Viola Statler and Helen Shafer, after they allegedly reneged on an Agreement of Sale.
Subsequently, appellant purchased from the Commonwealth the three liens which had encumbered the premises. *214 In 1981, appellant directed a writ of execution to the sheriff on one of the liens against the two-fifths undivided interest of Statler and Shafer. Appellant then purchased this remaining two-fifths interest at a bid of more than $5,000.00. The Sheriff of Northampton County filed a proposed schedule of distribution which applied the proceeds, after the costs of sale and real estate taxes were paid, to satisfy the three liens.
Statler and Shafer filed exceptions thereto, objecting to the application of the proceeds of sale of two-fifths of the land to the real estate taxes and judgment liens entered against the entire property. The exceptions were granted. While the trial court did not adopt Statler and Shafer's rationale, it fashioned an equitable remedy to recognize their right to contribution. No hearing was held on the exceptions.
The court ordered distribution of the sale proceeds in accordance with the schedule of distribution and ordered that Statler and Shafer be subrogated to three-fifths of the taxes and liens paid out of the proceeds of the sale. It then awarded Statler and Shafer a fresh lien to the extent of three-fifths of the taxes and the original Department of Public Welfare liens.
Appellant contends initially that the lower court committed an error of law in failing to hear evidence. The court was clearly authorized and empowered to "determine the exceptions" and render a decision thereon without a hearing. Pa.R.C.P. 3136(f). This argument is spurious.
The main thrust of appellant's argument concerns the lower court's action in failing to strike the exceptions of Statler and Shafer. He simply argues that all the taxes and liens discharged by the sale are entitled to participate in the proceeds of the sale, even though the sale involved only two-fifths of the property.[2]

*215 Indeed,
it is a general rule of law that liens upon real estate, whether prior or subsequent, including any lien on which the sale is made, are divested by judicial sale unless specifically preserved by statute or because of the peculiar character of the lien or encumbrance.
21 P.L.E. § 22, Judicial Sales, Liss v. Medary Homes, 388 Pa. 139, 130 A.2d 137 (1957).
Here, appellant directed the sheriff's sale against the most junior lien; however, all three liens set forth in the sheriff's schedule of distribution are entitled to participate in the proceeds of the sale.
Generally speaking, a judicial sale of real estate divests all prior and subsequent liens on the property sold, unless preserved by statute or are by nature incapable of discharge. (cites omitted) However liens in favor of the Commonwealth are only divested to the extent permitted by statute. (cites omitted) This is because of the inherent right of the sovereign to have priority of payment of its obligation. The question of sovereign right is not involved in the instant case. This judgment lien was created by a contract of the parties; none of the attributes of sovereignty entered into it because the State voluntarily gave them up.
Commonwealth v. Udzienicz, 353 Pa. 543, 546, 46 A.2d 231, 232 (1946).
The Legislature specifically exonerated certain liens from discharge by tax sale, [Tax Sale Act, The Act of May 29, 1931. P.L. 280, § 9][3] and did not include liens of the *216 Commonwealth, so we can only find that it did not intend to preserve such liens, but having already provided for their priority in payment, rested satisfied with that ample protection to the Commonwealth. The tax sale divested the lien of the Commonwealth as any other judgment is divested.
Id. 353 Pa. at 548-549, 46 A.2d 233. See also Ladner on Conveyancing, 4th Ed., § 16.02.
Appellant contends herein that the lower court abused its discretion and committed an error of law in applying the doctrine of subrogation to the instant case.
As the trial court notes, the Supreme Court in Moroney v. Copeland, 5 Wharton 407 (1839) stated:
On a sale of the interest of one tenant in common by execution on a judgment against him, the lien of a prior judgment against both is payable out of the proceeds: and the lien of these taxes being against the land of both jointly, is in the nature of a joint judgment, and must be paid out of the proceeds of sale. But as the effect of such payment is to take the interest of one to pay the whole, he, or those who represent him, have a right to contribution from the other co-tenant, to reimburse them the one-half thus paid.
Moroney v. Copeland, 5 Wharton at 419.
As against the common land, the right [to contribution] is enforceable by (1) subrogating the paying cotenant to the right of the lien holder whose claim the cotenant has paid. . ., (2) awarding the paying cotenant a lien or charge . . . or (3) both subrogation and lien. . . .
48 A.L.R.2d 1305, 1309, Cotenants-Contribution-Subrogation.

*217 Subrogation is an equitable doctrine and is applicable when every debt or obligation is paid from the funds of one person although properly payable from the funds of another.
McCahan's Estate, 312 Pa. 515, 168 A. 685 (1933). (See Thompson v. Griggs, 31 Pa.Super. 608 (1906) where a co-tenant, after judgment was entered on a mortgage on common property, made a payment of principal, interest and costs due on the mortgage, a court ordered her to be subrogated to the rights of her judgment creditor to the extent of one-half of the sum so paid by her and to collect this half out of the interest of her co-tenant in the land.) See also Gearhart v. Jordan, 11 Pa. 325 (1949), Brown v. McCullough, 60 Pa.Super. 98 (1915).
In the instant case, the lower court held that to give effect to the equitable right of subrogation, it would hold that Shafer and Statler have a valid lien to the extent of appellant's proportionate share, namely three-fifths, of the taxes and liens. We find no error in the court so fashioning a remedy.
Accordingly, we affirm the order of the lower court.
WIEAND, J., concurs in the result.
NOTES
[1]  A terre-tenant is one who becomes the owner of an interest in real estate after the lien of a judgment or mortgage has attached. Adelson v. Kocher, 154 Pa.Super. 548, 36 A.2d 737 (1944).
[2]  He initially maintains that Statler and Shafer lack standing since they allegedly reneged on their agreement to sell their two-fifths interest to him. An action in specific performance was instituted by appellant. Appellant, in effect, argues that should he prevail in that action, Statler and Shafer will lack standing in this action. Since the action in specific performance remains unresolved, Statler and Shafer have standing since they stand to benefit from this action.
[3]  72 P.S. § 5860.609, 1947, July 7, P.L. 1368, Art. VI, § 609, reads as follows:

§ 5860.609 Certain liens divested by sale
Every such sale shall discharge the lien of every obligation, claim, lien or estate with which said property may have or shall become charged, or for which it may become liable, except no such sale shall discharge the lien of any ground rent or mortgage which shall have been recorded before such taxes became liens, and which is or shall be prior to all other liens, except other mortgages and ground rents.
(Emphasis added)
Apparently, this section originally provided only that the sale should not discharge specified liens. It was changed by the act of 1939 to provide for the discharge of every obligation, claim, lien or estate except those specified. See Historical Note, 72 P.S. § 5971i.
