OPINION
PER CURIAM.On November 26, 1976, a vacancy was created in Magisterial District 05-2-13 (City of McKeesport, Allegheny County) by the death of the elected District Justice. Petitioner, Clifford W. Flegal, filed nominating petitions seeking to have his name placed on the 1977 primary ballot as a candidate for this office. Respondent, F. Kenneth Dixon, as Director of the Allegheny County Department of Elections rejected these petitions because petitioner had not completed a course of instruction as required by Sections 502 and 503 of the Magisterial District Reform Act, Act of July 15, 1976, P.L. 1014, No. 204, (42 P.S. §§ 2502, 2503). Petitioner is otherwise qualified to file nominating petitions for the office of District Justice.
Petitioner then filed a Complaint in Mandamus in the Court of Common Pleas of Allegheny County seeking to compel respondent to accept his nominating petitions. This request for relief was denied on March 4, 1977. This appeal, brought pursuant to the Act of July 31, 1970, P.L. 673, No. 223, Art. II (17 P.S. § 211.205), followed. We reverse the orders of the Court of Common Pleas of Allegheny County and the determination of the Director of the Allegheny County Department of Elections, and order that the nominating petitions of Clifford W. Flegal be accepted.
*251The Pennsylvania Constitution, Article 5, Section 12(b) provides in part:
“ . . . justices of the peace shall be members of the bar of the Supreme Court or shall complete a course of training and instruction in the duties of their respective offices and pass an examination prior to assuming office. Such courses and examinations shall be as provided by law.” (emphasis added).
The legislature, by the Act of July 15, 1976, P.L. 1014, No. 204, (42 P.S. § 2101 et seq.), sought to implement the provisions of article 5 of the Constitution of Pennsylvania relating to district justices. This implementing legislation is known as the “Magisterial District Reform Act.” Section 502 of that Act provides:
“District justices shall complete a course of training and instruction in the duties of their offices as required by the Constitution of the Commonwealth of Pennsylvania and successfully pass an examination prior to filing a nominating petition for a candidacy in a primary election for the office of district justice, which course of training and instruction shall not exceed four weeks in duration and shall consist of a minimum of 40 hours of class instruction in civil and criminal law including evidence, procedure, summary proceeding, and laws relating to motor vehicles. The department shall make the course of instruction available at such times as determined by it and the board, so as to insure that any district justice, to be elected or appointed may qualify to assume office as soon as possible. By regulation the board shall direct the department to conduct the course at such time, at such places and in such manner as it shall prescribe. In addition to those required by the Constitution of the Commonwealth of Pennsylvania and this, act to complete the course of training and instruction and successfully pass an examination prior to filing a nominating petition for a candidacy in a prior election for the office *252of district justice, any interested person may apply to the department to be enrolled in the course of instruction and take the examination, subject to such rules and regulations as the department with the approval of the board may determine. Any such interested person who successfully completes the course and passes the examination shall secure an appropriate certificate from the department and file same as set forth in section 505.”
Section 503 provides:
“The course of training and instruction required by the Constitution of the Commonwealth of Pennsylvania and this act shall be provided at the expense of the Commonwealth. Until such person has successfully completed the course of training and instruction and passed the examination, he shall not file any nominating petition for the office of district justice anywhere in the Commonwealth, (emphasis added).”
Petitioner argues that Sections 502 and 503, when read together, violate Article 5, Section 12(b) of the Constitution of this Commonwealth by establishing more stringent requirements for the filing of nominating petitions for the office of District Justice than is mandated by the Constitution. We agree. The Constitution requires only that “ . . .a course of training and instruction . . . [be completed] and . . . examination [be taken and passed] prior to assuming office.” Thus, the most that the Constitution requires is that such training be obtained prior to taking office. By prohibiting a person from filing nominating petitions until he or she “ . . . has successfully completed the course of training and instruction and passed the examination . . .”, the Act goes beyond what is necessary to implement the constitutional provision, and imposes restrictions upon candidates to the office of District Justice that do not exist in the Constitution. The constitutional provision can be fully implemented by al*253lowing the instruction to be completed after the election, so long as the examination is taken and passed before assuming office. The Act’s imposition of the additional requirement that the instruction and examination be completed before filing nominating petitions is therefore unconstitutional.
The Order of the Court of Common Pleas is vacated, the decision of the Allegheny County Department of Elections is reversed, and the Department is directed to accept the nominating petition of petitioner, Clifford W. Flegal.