Opinion by
Judge Cohns,This is an appeal by Roberta Jones (appellant) from a decision and order of the Court of Common Pleas of Philadelphia County which reversed an order of the Fair Housing Commission (Commission) *225and found that Fannie DeMarco (appellee) did not commit an unfair rental practice and that appellee’s right to possession of the premises was superior to that of appellant. We affirm.
On September 12, 1974, appellee sold the subject premises, located at 2020 W. Indiana Avenue in Philadelphia, to Leemoine Easter (Easter) and took back a Four Thousand Five Hundred Dollar ($4,500.00) purchase money mortgage. In 1976, Easter leased the property to appellant pursuant to a month-to-month oral lease. Appellant failed to make the rental payments. On March 12, 1979, Easter obtained a judgment of possession in the Philadelphia Municipal Court against appellant. Appellant timely appealed to the Court of Common Pleas of Philadelphia County, which, on Januarjr 22, 1981, dismissed her appeal. On June 23, 1983, the Superior Court affirmed the order of dismissal. Easter v. Jones, 314 Pa. Superior Ct. 639, 461 A.2d 888 (1983).
Some time in 1979, during the pendency of the landlord-tenant proceeding, Easter began defaulting on the purchase money mortgage held by appellee. After continued default, Easter conveyed the premises back to appellee in lieu of foreclosure on April 20, 1982.
On May 27, 1982, appellee notified appellant, by letter, that she had thirty (30) days in which to vacate the premises. Upon receipt of that letter, appellant filed a complaint with the Commission alleging that appellee’s action constituted an unfair rental practice in violation of Section 9-804(1) (a)1 of the Philadel*226pbia Code (Code) because numerous Code violations had not been corrected. On August 19, 1982, the Commission issued an order prohibiting the eviction proceedings by appellee. Appellee filed an appeal to the Philadelphia Court of Common Pleas. On August 11, 1983, the Court of Common Pleas reversed the decision of the Commission. An appeal to this court followed.
Appellant argues that the lower court erred in reversing the Commission’s order which prohibited appellee from evicting her. We disagree.
As Judge Greenberg, of the trial court, correctly noted:
A mortgagor retains the right to possession of a mortgaged property and may assign its right to possession to a tenant by way of a lease. A lease ... is subject to the preceding mortgage and the mortgagee’s right to possession upon default remains paramount to the possessory rights of the tenant. Peoples-Pittsburgh Trust Co. v. Henshaw, 141 Pa. Super[ior] [Ct.] 585, 15 A.2d 711 (1940); Brown v. Aiken, 329 Pa. 566, 198 A. 441 (1938). Upon foreclosure through a judicial sale, the lease is extinguished. . . . (Citations omitted.)2
In addition, Section 104 of the Landlord and Tenant Act3 states that: “Any person who acquires title to real property iby descent or purchase shall be liable to the same duties and shall have the same rights, *227powers and remedies in relation to the property as the person from whom title was acquired.”
Appellee’s right to possession of the subject property on April 20, 1982, when Easter deeded it back to her, was subject to appellant’s possessory rights, if any. However, appellant had no right to possession on April 20, 1982. The Municipal Court of Philadelphia, by order dated March 12, 1979, had granted a writ of possession to Easter. The Court of Common Pleas of Philadelphia County dismissed appellant’s appeal from that order, and the Superior Court affirmed the order of the Court of Common Pleas holding that appellant’s failure to comply with the requirement that she pay her rent into escrow in lieu of posting a bond, mandated dismissal of her appeal.
Furthermore, we deem it unimportant that appellee reacquired the property ,by a deed in lieu of foreclosure, instead of by a foreclosure action on the mortgage. Appellee’s right to possession is still superior to appellant’s because appellee’s rights predated appellant’s lease.
We conclude that appellant is a trespasser and that appellee may step into Easter’s shoes, the grantor, and enforce the order of possession against appellant. Also, since appellant is a trespasser, appellee did not commit an unfair rental practice under Section 9-804(1) (a) of the Code in attempting to evict her.
Accordingly, we affirm.
Order
And Now, this 19th day of June, 1985, the order of the Court of Common Pleas of Philadelphia County entered on August 11,1983, No. 2196, September Term, 1982, is hereby affirmed.
Philadelphia Code §9-804(1) (a). This section provides that:
(1) Whenever any premises are found in violation of any provision of the Philadelphia Code and notice of violation has been issued by any department or agency of the City, it shall be unlawful for any owner, landlord, agent or other person operating or managing such premises to:
*226(a) terminate the lease with the existing tenant unless the tenant has failed to pay rent, committed waste or caused the premises to have been in violation under the Philadelphia Code.
Trial court opinion, pages 2-3.
Act of April 6, 1951, P.L. 69, as amended, 68 P,S. §250.104,