
256 Cal.App.2d 357 (1967)
WEST COAST ADVERTISING COMPANY, Plaintiff and Respondent,
v.
CITY AND COUNTY OF SAN FRANCISCO et al., Defendants and Appellants.
Civ. No. 23483. 
California Court of Appeals. First Dist., Div. Two.  
Nov. 27, 1967.
 Thomas M. O'Connor, City Attorney, and Edmund A. Bacigalupi, Deputy City Attorney, for Defendants and Appellants.
 Molinari, Casalnuovo & Berger and Leonard B. Berger for Plaintiff and Respondent.
 TAYLOR, J.
 The City and County of San Francisco, its zoning administrator and its director of planning, appeal from a judgment granting petitioner, West Coast Advertising Company, a peremptory writ of mandate directing the issuance of a building permit to erect a billboard. The question on appeal is whether the trial court's order granting the writ pursuant to the then-existing city ordinance should now be reversed because of a subsequent amendment prohibiting such billboards.
 The facts are not in dispute. On April 1, 1965, petitioner, a California corporation engaged in the business of erecting and maintaining advertising signs, applied to the city zoning administrator for a permit to erect a billboard on its premises adjacent to the freeway at 2513 San Bruno Avenue. The zoning administrator denied the permit and thereafter petitioner appealed to the Board of Permit Appeals, hereafter Board. The Board heard the appeal of petitioner on May 10, June 16 and June 21, 1965, overruled the decision of the zoning administrator and ordered approval of the application for a permit on the grounds that the billboard was not a structure within the planning code. Thereafter, the zoning administrator and planning director requested a rehearing before the Board, which was denied on August 16.
 On September 7, petitioner filed its application for a writ of mandate and the alternative writ issued. At the September 29 hearing on the application, all parties knew that the city was then considering a new ordinance, No. 263- 65, prohibiting billboards on property adjacent to freeways and that if passed, petitioner could not compel the issuance of the writ. *359 Petitioner indicated it would take its chances on the new ordinance. The new ordinance was passed on October 11, had its second reading on October 18, was signed on October 22, and became effective 30 days thereafter on November 21. On October 21, the court below granted the writ of mandate on the basis of the original ordinance still in effect. This appeal ensued.  [fn. 1]
 [1] Petitioner contends that the writ was properly issued as the new ordinance did not become effective until 30 days after the order entered by the court below and that it now has a vested right to the building permit. The applicable principle of law was recently stated by our Supreme Court in Russian Hill Improv. Assn. v. Board of Permit Appeals, 66 Cal.2d 34 [56 Cal.Rptr. 672, 423 P.2d 824].  [fn. 2] The court, citing Brougher v. Board of Public Works, 205 Cal. 426, 432-435 [271 P. 487], stated at page 39: "... even a permit which had achieved administrative finality can be revoked on the basis of a subsequent change in the zoning laws. The permittee could win immunity from such 'ex post facto' revocation only by constructing a substantial portion of the structure authorized by his permit in good faith reliance upon the prior law." In the instant case, there was no permit issued and thus no substantial construction in reliance thereon.
 The situation here is similar to that involving the revocation of a permit after the passage of prohibitory legislation. In view of the pending ordinance, the administrator was well within his discretion in refusing the permit. [2] As stated by the court in the Russian Hill Improvement case, the administrative bureau has the "discretion to deny the permit application on the ground that the structure described therein would soon be rendered illegal by the pending ordinance." (P. 37, fn. 5.) Wheat v. Barrett, 210 Cal. 193 [290 P. 1033], is directly in point. In that case, a judgment granting a writ of mandate ordering the issuance of the building permit was reversed where a new ordinance prohibiting the structure in question was enacted while the judgment was on appeal.
 [3] Petitioner argues for the first time in its petition for rehearing that section 150, subdivision (d) of the San Francisco *360 City Planning Code  [fn. 3] precludes this court from applying the new ordinance. It relies on Russian Hill Improv. Assn. v. Board of Permit Appeals, supra, to argue that the permit had been granted within the meaning of section 150 when the Board overruled the denial of the planning officer. But as stated by Justice Tobriner in the Russian Hill case in referring to the effect of section 150, "Defendants correctly note that the Board of Permit Appeals cannot itself 'grant' a permit but can only direct the permit bureau to do so." (P. 43.) Since the zoning administrator here refused to comply either with the order of the Board or the trial court to "grant" the permit but chose rather to stick by his guns and exhaust the legal remedy afforded by this appeal, the permit had never "been legally granted prior to the effective date" of the amendment and thus section 150 is clearly not applicable.
 This court must decide the question here presented according to the existing law and thus set aside the judgment (Wheat v. Barrett, supra; Pacific Gas etc. Co. v. State of California, 214 Cal. 369 [69 P.2d 78]; Ziffrin, Inc. v. United States, 318 U.S. 73 [87 L.Ed. 621, 63 S.Ct. 465]; City & County of San Francisco v. Budde, 139 Cal.App.2d 10, 12 [292 P.2d 955, 294 P.2d 503]; Thompson v. City of Los Angeles, 82 Cal.App.2d 45 [185 P.2d 393]; Messenger v. Kingsbury, 158 Cal. 611 [112 P. 65]). Inasmuch as we have determined that the trial court's order granting the writ must be reversed, it is unnecessary to discuss the remaining contentions of the parties.
 The judgment is reversed.
 Shoemaker, P. J., and Agee, J., concurred.
NOTES
[fn. 1]  1. Thereafter, this court granted the city's motion to augment the record to include the new ordinance.
[fn. 2]  2. The case is factually distinguishable as there the new ordinance became effective while the matter was pending before the Board.
[fn. 3]  3. Section 150, subdivision (d) provides: "Any building or use for which a permit has been lawfully granted prior to the effective date of an amendment to the City Planning Code, where such date is subsequent to May 2, 1960, may be completed and used in accordance with the approved plans, provided that construction is started and diligently prosecuted to completion in accordance with Section 304 of the Building Code, and such building or use shall thereafter be deemed to be a lawfully existing building or use." (Amended Ord. 200-60, approved April 21, 1960.) (Italics added.)
