
    TOWN OF NAGS HEAD v. ROBERT C. TILLETT, ZENOVA P. TILLETT, BRADFORD NEIL LOY, PETER L. MARSHALL and wife, FLORA COSTIN MARSHALL, DOROTHY HAND WAGONER and husband, JAMES L. WAGONER, SR., RICHARD L. RUSSAKOFF and wife, RISE GURY RUSSAKOFF, JAMES T. RYCE and wife, SUSAN RYCE, and E. CROUSE GRAY, JR., Trustee
    No. 436PA84
    (Filed 5 November 1985)
    1. Municipal Corporations § 30— violation of subdivision ordinance —zoning statute — no authority for denial of building permit
    The Court of Appeals erred by citing the broad enforcement provisions of G.S. 160A-389, a zoning statute, as the justification for vacating an order enjoining the town from denying a building permit to one whose lot violated the subdivision requirements of the Nags Head Code of Ordinances; however, the broader enforcement license of G.S. 160A-389 applies and would sustain such a remedy insofar as the Town rests its denial of a building permit upon violation of the zoning laws.
    2. Vendor and Purchaser § 11— purchase of nonconforming subdivision lot — violation of contract clause —contract not merged in the deed — rescission proper
    The purchasers of a lot in a subdivision in Nags Head which did not conform to provisions of the Nags Head Code of Ordinances are entitled to rescission for material failure of consideration under the contract of sale insofar as their attempts to obtain a building permit remain frustrated by the nonconforming nature of their property so that they cannot reasonably use their property for residential purposes where the contract of sale provided that there “must be no . . . governmental regulation that would prevent the reasonable use of the property for residential purposes,” the contract contained a survival clause stating that any provision of the contract required to be observed or performed after closing should remain binding until satisfied, and the deed specifically stated that the conveyances were pursuant to the contract and its terms. G.S. 160A-389, G.S. 160A-375.
    On discretionary review of the decision of the Court of Appeals, 68 N.C. App. 554, 315 S.E. 2d 740 (1984), affirming in part and vacating in part judgment entered by Stevens, J., 5 April 1984, in Superior Court, DARE County, and of the order of the Court of Appeals filed 4 December 1984 finding defendants Ryce’s cross-assignment of error to be without merit. Heard in the Supreme Court 11 September 1985.
    
      
      Kellogg, White, Evans, Sharp and Michael, by Thomas L. White, Jr., for plaintiff-appellee.
    
    
      Shearin & Archbell, by Norman W. Shearin, Jr., for defendant-appellee Bradford Neil Loy.
    
    
      LeRoy, Wells, Shaw, Hornthal & Riley, by L. P. Hornthal, Jr. and Donald C. Prentiss, for defendant-appellants James T. and Susan Ryce.
    
   MARTIN, Justice.

In January of 1982, Susan and James T. Ryce applied to the Town of Nags Head for a building permit for a lot they had purchased from Bradford Neil Loy in 1980. The lot was one of four parcels created three years earlier by the subdivision of a 6.8-acre tract of land belonging to Robert C. and Zenova P. Tillett. The Ryces were denied a building permit on the grounds that their lot violated several provisions of the Nags Head Code of Ordinances, all of which appear in chapter 17, entitled “Subdivision of Land.” Specifically, the subdivision had never been approved by the town planning board, the lot did not meet frontage requirements, and it did not front on an improved street as described in both subdivision and zoning ordinances.

On 29 March 1982 the Town of Nags Head brought a declaratory judgment action seeking to have all deeds deriving from the original 1977 division of the Tillett tract declared void and to enjoin all future conveyances of the property that violate municipal and state subdivision laws. Defendants Ryce counterclaimed, alleging their entitlement to a mandatory injunction compelling the issuance of a building permit and enjoining interference with the use of their property. In the alternative, defendants Ryce cross-claimed against defendant Loy, asking that if the trial court found in plaintiffs favor, it grant rescission of the sales contract and deed between them and Loy and restitution of their purchase price and expenditures.

The trial court dismissed the town’s declaratory judgment action and enjoined the town from denying a building permit to defendants Ryce. The Court of Appeals affirmed the dismissal of the declaratory judgment action but vacated the trial court’s injunction concerning the denial of a building permit.

The appellate court did not address the Ryces’ cross-assignment of error concerning the cross-claim against defendant Loy. A Ryce petition for rehearing was denied by that court on 12 July 1984. We reversed the Court of Appeals’ denial and ordered a rehearing on the merits of the cross appeal. On 4 December 1984 the Court of Appeals filed an order finding the cross-assignment of error to be without merit. This Court granted defendants Ryce’s petition for discretionary review in order to address two questions remaining in this case: (1) the validity of the denial of a building permit by the Town of Nags Head and (2) the merits of the Ryce cross-claim. We affirm in part, reverse in part, and remand.

The Court of Appeals concluded, and we agree, that the Declaratory Judgment Act is restricted to declaring the rights and liabilities of parties regarding property, but that for “the [trial] court to find that the conveyances are void as a matter of law” was beyond the scope of the act. Town of Nags Head v. Tillett, 68 N.C. App. 554, 558, 315 S.E. 2d 740, 742. We agree as well that an injunction will not lie to restrain an act already completed at the time the action is instituted. Austin v. Dare County, 240 N.C. 662, 83 S.E. 2d 702 (1954). In addition, the Court of Appeals correctly stated that the enabling statute at issue in this case provides no basis for voiding a conveyance of real property that fails to meet subdivision requisites. An exception to the general rule that an agreement that violates the law — whether constitution, statute, or municipal ordinance — is illegal and void was delineated by this Court in Financial Services v. Capitol Funds, 288 N.C. 122, 217 S.E. 2d 551 (1975). We held in Financial Services that where the statute expressly designates the offense and clearly states the punishment for its violation, “the legislative bodies dealt with the matter completely and did not intend to invalidate conveyances of real property because of failure to follow the provisions of this penal legislation.” Id. at 135, 217 S.E. 2d at 560.

Of the two questions remaining for this Court to resolve, that of the validity of the town’s denying a building permit to defendants Ryce can be fruitfully addressed by examining the town ordinances and state statutes supposedly authorizing that means of compelling compliance.

Chapter 160A of the General Statutes of North Carolina contains enabling legislation for city and town ordinances regulating subdivision and zoning. Article 19 of that chapter is deliberately divided into eight parts. Two of these provide separately for the regulation of subdivisions and for zoning. The specific penal and equitable relief set out in section 160A-375 is relief intended to deter those who violate subdivision ordinances; section 160A-389 permits broader, “appropriate” action and proceedings to prevent or correct the violation of a zoning ordinance.

The Nags Head Code of Ordinances similarly contains enforcement provisions for subdivision regulation that are distinctly separate from enforcement provisions for zoning regulation. The Code’s chapter 17 is dedicated to subdivision regulation. Section 17-10 of that chapter tracks the language of N.C.G.S. 160A-375, authorizing a criminal penalty and injunctive remedies for violations of subdivision ordinances. Section 17-11 posits that before a building permit can be issued for the erection of any structure in a proposed subdivision by the subdivider or his agent, the subdivision must be approved in accordance with the chapter. Section 3.08 of the Nags Head zoning ordinance also prohibits the issuance of a building permit for any lot that does not front on a public right-of-way at least thirty feet wide.

It is clear to us that the penal and injunctive provisions of section 17-10 do not exceed the scope of that section’s parallel enabling legislation, N.C.G.S. 160A-375. It is likewise clear that the remedial breadth of N.C.G.S. 160A-389 supports the enforcement provisions of such zoning ordinances as section 3.08.

But it is another matter to cite the broad enforcement provisions of N.C.G.S. 160A-389, a zoning statute, as the statutory basis for denying a building permit to one whose lot violates the subdivision requirements of chapter 17 of the Nags Head Code of Ordinances. The Court of Appeals therefore erred in citing that statute and listing a number of subdivision ordinance violations by the Ryce lot as justification for vacating the order of the trial court that enjoined the town from denying the Ryces a building permit.

Insofar as the Town of Nags Head rests its denial of a building permit upon the violation of the zoning laws, however, the broader enforcement license of N.C.G.S. 160A-389 applies and would sustain such a remedy. In the event that the Ryces’ attempts to obtain a building permit remain frustrated by the nonconforming nature of their property so that they cannot reasonably use their property for residential purposes, then they are entitled to rescission for a material failure of consideration under the contract of sale and deed with defendant Loy.

The contract of sale between Loy and the Ryces provided that there “must be no . . . governmental regulation that would prevent the reasonable use of the property for residential purposes.” The contract also contained a survival clause, stating that any provision of the contract required by its nature and effect to be observed or performed after the closing should remain binding after the closing until satisfied. The deed specifically stated that the conveyances were “pursuant to said contract and subject to its terms.” Such language in the deed is irrefutable evidence of the parties’ intention that the contract not merge into the deed.

In the event that the Ryces are unable to obtain a building permit for residential purposes, it would constitute a material breach of their contract with Loy, defeating the very terms of the contract. Childress v. Trading Post, 247 N.C. 150, 100 S.E. 2d 391 (1957). Whereupon, defendants Ryce would be entitled to be restored to the condition they occupied on the day the contract was entered into. Id. The 4 December 1984 order of the Court of Appeals, ruling that the Ryces’ cross-claim was without merit, is reversed.

Accordingly, we hold that although the town may deny a building permit to applicants whose property violates zoning ordinances, as authorized by section 3.08 of the Nags Head Code of Ordinances and by N.C.G.S. 160A-389, its enforcement of subdivision ordinances is restricted to the penal and injunctive relief of N.C.G.S. 160A-375 and section 17.10 of the code of ordinances. In addition, insofar as defendants Ryce are thwarted by the execution of such ordinances and statutes from the reasonable use of their property for residential purposes, they are entitled to rescission of the instruments of conveyance with Loy and restitution.

Affirmed in part, reversed in part, and remanded. 
      
      . Section 17-27 of the Nags Head subdivision ordinance requires residential streets to be paved and of a minimum width. Section 3.08 of the town’s zoning ordinance similarly prohibits structures on lots not abutting a public right-of-way of a minimum width. The narrow clay road serving the Ryce lot met the requirements of neither of these ordinances.
     
      
      . Apropos, plaintiffs argument that N.C.G.S. 160A-175, which provides general equitable enforcement powers, authorizes invalidation of the conveyances is unavailing.
     
      
      . § 160A-375. Penalties for transferring lots in unapproved subdivisions.
      If a city adopts an ordinance regulating the subdivision of land as authorized herein, any person who, being the owner or agent of the owner of any land located within the jurisdiction of that city, thereafter subdivides his land in violation of the ordinance or transfers or sells land by reference to, exhibition of, or any other use of a plat showing a subdivision of the land before the plat has been properly approved under such ordinance and recorded in the office of the appropriate register of deeds, shall be guilty of a misdemeanor. The description by metes and bounds in the instrument of transfer or other document used in the process of selling or transferring land shall not exempt the transaction from this penalty. The city may bring an action for injunction of any illegal subdivision, transfer, conveyance, or sale of land, and the court shall, upon appropriate findings, issue an injunction and order requiring the offending party to comply with the subdivision ordinance.
     
      
      . § 160A-389. Remedies.
      If a building or structure is erected, constructed, reconstructed, altered, repaired, converted, or maintained, or any building, structure or land is used in violation of this Part or of any ordinance or other regulation made under authority conferred thereby, the city, in addition to other remedies, may institute any appropriate action or proceedings to prevent the unlawful erection, construction, reconstruction, alteration, repair, conversion, maintenance or use, to restrain, correct or abate the violation, to prevent occupancy of the building, structure or land, or to prevent any illegal act, conduct, business or use in or about the premises.
     
      
      . It is noteworthy that these sections govern the acts of the subdivider or his agent, not the purchaser of the lot.
     