Opinion by
Mr. Justice O’Brien,On May 4, 1967, the appellee entered into a written option to purchase 6.24 acres located at Exit No. 16 of Interstate Route 83 for the purpose of erecting a gasoline service station. The sellers agreed that if appel*458lee were prevented from acquiring a suitable use permit, tbe seller would pay back the consideration paid for the option and both parties would be relieved from all obligations.
On December 21, 1967, appellee received from the proper officer of Fairview Township a building permit authorizing the erection of a gas station on the property. One week later, on December 28, 1967, appellee took title to the property and paid the $50,000 purchase price.
The appellee’s original plan showed the station location to be on the east side of the tract, but because of the refusal of the township engineer to approve appellee’s drainage system, and because of the fact that less fill would be required, the location was moved to the west side of the tract.
On April 4, 1968, the township solicitor notified appellee that the building permit was revoked for the reasons that (1) the application “. . . misstates the area of the land for which the permit was sought . . .” and (2) that an ordinance, adopted March 30, 1968, zoning appellee’s land as residential, prohibited the erection of the proposed gas station.
Appellee appeared before the Township Planning Commission and on September 10, 1968, before the Township Board of Adjustment, seeking to obtain a variance. No formal application was filed as no forms were available and the Board had no established rules for processing applications. Subsequent to the expiration of forty-five days after appellee’s appearance before the Board, appellee filed a complaint in mandamus.
On November 21, 1969, the court entered an adjudication which included an order directing the reinstatement of the building permit to the appellee because it had acquired a vested interest in the building permit *459■which was improperly revoked. Because this was dis-positive of the issue, the court did not deal with appellee’s other contention that its application for a variance should be deemed granted because of the failure of the Board of Adjustment to act within forty-five days of the date of the hearing.
The Township appeals, contending that the appellee did not act in good faith when it exercised its. option to purchase the land during the time when the Township was in the process of adopting the zoning ordinance.
The adoption of a zoning ordinance normally requires an extended period of time. In attempting to draw a line before which a party obtains a vested interest in a building permit, notwithstanding the fact that the governing body is considering a change in the zoning ordinance, which will perpetuate a nonconforming use, our cases have led to the following rule outlined in Penn Twp. v. Yeckco Bros., 420 Pa. 386, 217 A. 2d 171 (1966) : “[A] property owner who is able to demonstrate (1) that he has obtained a valid building permit under the old zoning ordinance, (2) that he got it in good faith—that is to say without ‘racing’ to get it before a proposed change was made in the zoning ordinance—and (3) that in good faith he spent money or incurred liabilities in reliance on his building permit has acquired a vested right and need not conform with the zoning ordinance as changed.”
We have also stated that a building permit can be denied if a change in the zoning ordinance is pending at the time of the application. Lhormer v. Bowen, 410 Pa. 508, 188 A. 2d 747 (1963), Shapiro v. Zoning Bd. of Adj., 377 Pa. 621, 105 A. 2d 299 (1954), Kline v. Harrisburg, 362 Pa. 438, 68 A. 2d 182 (1949).
The appellant contends that the ordinance was pending on December 21, when appellee applied for the *460building permit. It emphasizes that Fairview Township had begun long-range planning in the middle 1960’s, and in 1967 a comprehensive plan had been worked out for the orderly development of the Township. However, we find that the Township had taken no public action on such plans, and the Township does not deny that the permit was valid when issued. Moreover, the appellee had no knowledge of any Township action when, on December 28, 1967, in reliance on the permit it had received, it purchased the real estate for $50,000.
In fact, no public notice of any proposed ordinance was given until subsequent to appellee’s purchase of the land, and no public hearing was held until February 7, 1968, so in no sense can it be said that appellee should have had such knowledge. Consequently, appellee has met the test outlined in Penn Twp. v. Yecko Bros., supra. It has a valid permit under the existing ordinance, it received the permit in good faith, and it spent money in reliance on its building permit. It has acquired a vested right to that permit.
Judgment affirmed.