
353 N.W.2d 138 (1984)
Alan HOOPER, et al., Appellants,
v.
The CITY OF ST. PAUL and the City Council Thereof, Respondents.
No. C8-83-987.
Supreme Court of Minnesota.
August 24, 1984.
*139 Kenneth E. Tilsen, St. Paul, for appellants.
Edward Starr, Jerome Segal, St. Paul, for respondents.
Heard, considered, and decided by the court en banc.
COYNE, Justice.
Plaintiffs David and Mary Brewer, as fee owners, and Alan Hooper, as contract vendee, instituted this action for a declaratory judgment that the use of each of two structures situated on property commonly known as 387 Pelham Boulevard in St. Paul as a single family dwelling constitutes a valid nonconforming use under the Saint Paul Zoning Code. They appeal from the judgment of the Ramsey County District Court declaring that use of the premises for any purpose other than occupancy by a single family is unlawful. We reverse.
The property in question is a large, irregularly shaped lot on which two separate structures  a main house and carriage *140 house  are situated. In 1918 Edward Brewer, plaintiff David Brewer's father and a well-known local artist, moved the former damkeeper's house from the bank of the Mississippi River to the property and placed it on a foundation he had constructed. Brewer then had a carriage house built. Although Brewer had secured a permit for the construction of the foundation of the main house, it appears that he built the carriage house without a building permit. A 1922 assessor's card is, however, attached to the foundation permit. The assessor's card variously identifies the carriage house as a single dwelling/studio with a toilet and a "studio apt. & gar."
Until Edward Brewer's death in 1971, the carriage house had served primarily as the artist's studio. The apartment had been used as living quarters only during a period in the 1920's when workmen used it as part time housing and, again, from 1939 to 1941 when David Brewer resided there while attending college.
In 1969 a fire caused severe internal damage to the carriage house. Restoration work, accomplished without a building permit, was completed about the time of Edward Brewer's death. David Brewer purchased the property in 1971 and from that time forward the carriage house has served as the residence of a succession of tenants. The carriage house was further improved pursuant to a 1975 building permit authorizing the alteration of "existing servant's quarters."
On December 13, 1976, the zoning classification of the property was changed from duplex to R-3 single family residence. In 1981 Brewer applied for a certificate of legal nonconforming use for the carriage house. In the application he affirmed that the present use of the property had been in existence more than 20 years. The zoning administrator approved the application. One of Brewer's neighbors requested review of the administrator's decision pursuant to St. Paul Zoning Code § 64.203 (1981), and a public hearing was held. The board of zoning appeals concluded that the property was not entitled to lawful nonconforming use status and reversed the administrator's ruling. The board's determination was affirmed by the St. Paul City Council and ultimately by the district court.
It is a fundamental principle of the law of real property that uses lawfully existing at the time of an adverse zoning change may continue to exist until they are removed or otherwise discontinued. 8A E. McQuillin, Municipal Corporations, § 25.180 (3d ed. 1976). As we held in County of Freeborn v. Claussen, 295 Minn. 96, 99, 203 N.W.2d 323, 325 (1972), "[a] residential zoning ordinance may constitutionally prohibit the creation of uses which are nonconforming, but existing nonconforming uses must either be permitted to remain or be eliminated by use of eminent domain", citing Hawkins v. Talbot, 248 Minn. 549, 80 N.W.2d 863 (1957).
In keeping with this principle, the St. Paul Zoning Code includes this statement in its general provisions: "It is the intent of this code to permit legal nonconforming * * * uses existing on the effective date of this code or amendment thereto, to continue until they are removed but not to encourage their survival." St. Paul Zoning Code § 62.102, subd. 1 (1981). This section also creates a presumption that a use is a legally nonconforming use if it is demonstrated by clear and convincing evidence either that the use was established pursuant to building permits issued by the city or that the use had been in existence continuously for at least 20 years prior to the effective date of rezoning.
The district court construed this provision to preclude the continuance of any nonconforming use except a use which either had been established pursuant to a building permit or had existed for 20 years. Such a restrictive construction, however, casts grave doubt on the validity of the zoning code because it fails to honor the constitutional protection afforded existing uses. County of Freeborn v. Claussen, supra. Moreover, reference to other sections of the zoning code confirms that § 62.102, subd. 1, simply creates a presumption that certain nonconforming uses *141 are lawful without prohibiting the continuance of other existing uses.
St. Paul Zoning Code § 62.102, subd. 5, deals with nonconforming uses and clause 8, which was added to subdivision 5 in 1980, refers specifically to existing two-family residential use:
Subd. 5. Nonconforming uses of structures and land. If a lawful use of a structure, or of structure and land in combination, exists at the effective date of adoption or amendment to this code, that would not be allowed in the district under the terms of this code, the lawful use may be continued so long as it remains otherwise lawful, subject to the following provisions:
* * * * * *
(8) In any R-1, R-2, R-3, and R-4 District, an existing two-family residential use shall not be nonconforming as to the use of structure and land, and may be enlarged, extended, reconstructed or altered provided the minimum yard setback requirements of the district in which it is located are met and that the maximum percentage of the lot occupied by the main building does not exceed that allowed.
(emphasis added).
It is undisputed that the carriage house has been rented and used continuously as one of two separate residences on the property since 1971. It is also undisputed that until 1976, when the property was rezoned to R-3 single family residential, this two-family use conformed with its duplex zoning classification. According to the provisions of § 62.102, subd. 5(8), the continued use of the carriage house as a second residence on the property is a conforming use which may be reconstructed or altered to the same extent as any other conforming use rather than a disfavored nonconforming use whose survival is discouraged. The City contends, however, that the use of the carriage house as a residence was never lawfully established because the Brewers did not obtain building permits for either the original construction or the post-fire reconstruction. Hence, the City argues, its use as a residence was unlawful both before and after the zoning change.
The general rule that only existing lawful uses are entitled to due process protection as nonconforming uses is directed primarily to the protection of uses established in compliance with then existing zoning classifications. County of Freeborn v. Claussen, 295 Minn. 96, 99, 203 N.W.2d 323, 325 (1972). Violations of ordinances unrelated to land use planning do not render the type of use unlawful. See Carroll v. Hurse, 103 Ill.App.3d 984, 59 Ill.Dec. 587, 431 N.E.2d 1344 (1982); Board of Selectmen of Wrentham v. Monson, 355 Mass. 715, 247 N.E.2d 364 (1969). If the reconstructed carriage house fails in some respect to meet the requirements of the building code, the City must seek its remedy in the enforcement provision of the building code. The City's remedy does not lie in denying the owners the right to continue the existing two-family residential use of the property, a use permitted under the zoning code in effect when the use was established.
Reversed.
