
360 N.W.2d 568 (1985)
Leroy F. MOLITOR, Appellant,
v.
CITY OF CEDAR RAPIDS, Iowa and Cedar Rapids Housing Board of Appeals, Appellees.
No. 84-71.
Supreme Court of Iowa.
January 16, 1985.
Robert S. Hatala and Gerald T. Sullivan of Crawford, Sullivan, Read & Roemerman, Cedar Rapids, for appellant.
David P. McManus, Asst. City Atty., for appellees.
Considered by UHLENHOPP, P.J., and HARRIS, McCORMICK, McGIVERIN, and SCHULTZ, JJ.
McCORMICK, Justice.
The question here is whether a city has power to confer jurisdiction in the district court by city ordinance. Petitioner LeRoy F. Molitor sought to appeal an adverse ruling of the housing board of respondent City of Cedar Rapids to the district court pursuant to the City's housing ordinance. The district court found that it lacked jurisdiction of the appeal and dismissed the case. We affirm the district court.
Cities have statutory authority to adopt city housing codes. See Iowa Code § 364.17 (1983). They are granted certain enforcement powers but no provision for judicial review exists in the statute. Cedar Rapids enacted its housing code by ordinance in December 1981. The ordinance makes a housing inspector's notices and orders subject to review by a housing board of appeals. It also provides:
Appeal to District Court. Any person adversely affected by a decision of the Housing Board of Appeals may appeal said decision to the Iowa District Court *569 for Linn County by filing a petition with said court and serving a copy thereof to the office of the Housing Code Administrator, acting in behalf of the Housing Board of Appeals, in the same manner as the service of process in a civil action within thirty (30) days of the issuance of said decision.
Petitioner attempted an appeal to the district court under this provision after the board of appeals rejected his challenge to a housing inspector's order to correct alleged code violations.
The district court raised the jurisdictional issue on its own motion. Because its authority to proceed further in the case was at stake, the court acted correctly in raising the issue. See Recker v. Gustafson, 271 N.W.2d 738, 739 (Iowa 1978). The parties, for obvious reasons, contended that the court had jurisdiction of the case, but parties cannot confer jurisdiction by consent. See In re Estate of Dull, 303 N.W.2d 402, 406 (Iowa 1981). Jurisdiction of a case is given to a court solely by law. See O'Kelley v. Lochner, 259 Iowa 710, 715, 145 N.W.2d 626, 629 (1966). The Constitution of Iowa expressly provides that the district court shall have jurisdiction "in such manner as shall be prescribed by law." Iowa Const. art. V, § 6.
The parties suggest two possible sources of the City's authority to confer jurisdiction on the district court in its housing ordinance. One source is Code section 602.2 which grants district court jurisdiction "in all appeals and writs of error taken in civil and criminal actions and special proceedings authorized to be taken from all tribunals, boards, or officers, under any provisions of the laws of this state...." The other source is the City's home rule power under Iowa Constitution article III, section 38A and Code section 364.1.
The Iowa district court is a state court. Its jurisdiction is conferred by the constitution and by legislation. Code section 602.1 provides that the district court "shall have exclusive, general and original jurisdiction of all actions, proceedings, and remedies, civil, criminal, probate, and juvenile, except in cases where exclusive or concurrent jurisdiction is conferred upon some other court, tribunal, or administrative body, and it shall have and exercise all the power usually possessed and exercised by trial courts of general jurisdiction and shall be a court of record." In conferring jurisdiction over appeals and writs of error "from all tribunals, boards, or officers, under any provisions of the laws of this state," we believe section 602.2 refers to state law and not city ordinances. The constitutional and statutory framework makes jurisdiction of state courts "a state affair rather than a municipal affair." 2 E. McQuillan,The Law of Municipal Corporations § 4.95 at 165 (1979). If municipal corporations had the power to confer jurisdiction on the district court, the jurisdiction of the court potentially could be fragmented into as many components as there are municipalities.
Home rule does not give municipal corporations power to legislate for the state. The constitution gives them certain power only "to determine their local affairs and government" when "not inconsistent with the laws of the General Assembly." Iowa Const. art. III, § 38A. Municipal power over local and internal affairs does not include authority to determine the jurisdiction of a state court. We find no basis in the constitution or statutes for holding otherwise.
Previous cases support this view of municipal authority. In Cedar Rapids Human Rights Commission v. Cedar Rapids Community School District, 222 N.W.2d 391 (Iowa 1974), this court recognized that a statutory grant of authority to establish a city human rights commission did not include authority to establish a commission with the power of a court. Id. at 393-98. Moreover, the city ordinance was invalidated because of its failure to provide for judicial review as required by the governing statute. Id. at 402. The case thus exemplifies how municipal authority to provide for judicial review must derive from and accord with state law.
*570 An additional example is presented in City of Iowa City v. Westinghouse Learning Corporation, 264 N.W.2d 771 (Iowa 1978). There, in contravention of the legislative grant of authority, the city ordinance purported to provide for the district court rather than commission to make the initial determination concerning discrimination complaints. The ordinance was stricken because of its inconsistency with the statutory grant of authority. Id. at 773. In contrast, a local human rights ordinance provision for judicial review was upheld in Dietz v. Dubuque Human Rights Commission, 316 N.W.2d 859, 861 (Iowa 1982), because the provision was derived from and required in the statutory grant. No such statutory authority or mandate appears in the present case.
Similar limitations on municipal authority have been recognized in other jurisdictions. See Civil Service Commission of City of Detroit v. Engel, 187 Mich. 83, 153 N.W. 358 (1915) (city lacked authority to interfere with power over court personnel incidental to state grant of jurisdiction); Fawcett v. Superior Court of Pierce County, 14 Wash. 604, 45 P. 23 (1896) (jurisdiction of state court to hear local election contest could be conferred only by constitution and legislation); see also Johnson v. Board of Commissioners of District of Columbia, 116 A.2d 161 (D.C.1955) (review of administrative board decision denied because not authorized by any district statute); City of Atlanta v. Landers, 212 Ga. 111, 90 S.E.2d 583 (1955) (creation of state courts is a sovereign state function); In re Fortune, 138 Ohio St. 385, 35 N.E.2d 442 (1941) (municipalities have no independent power to establish courts or regulate the administration of justice); Lines v. City of Milwaukie, 15 Or.App. 280, 515 P.2d 938 (1973) (home rule city has no power to expand or contract the jurisdiction of state courts).
We conclude that the City lacked authority to provide in its housing code for appeal from the housing board of appeals to the district court. Because the court lacked jurisdiction of the controversy, the case was properly dismissed. We have no occasion to determine whether petitioner might have invoked the court's jurisdiction under authority of state law on a different theory of action.
AFFIRMED. *571
