Any candidate whose name appears upon the primary ballot of any political party may contest the election of the candidate or candidates nominated for the office for which he or she was a candidate by his or her political party, upon the face of the returns, by filing with the clerk of the circuit court a petition in writing, setting forth the grounds of contest, which petition shall be verified by the affidavit of the petitioner or other person, and which petition shall be filed within 10 days after the completion of the canvass of the returns by the election authority making the final canvass of returns. The contestant shall also file with that election authority (and if for the nomination for an office, certified tabulated statements of the returns of which are to be filed with the State Board of Elections, also with the election authorities in whose jurisdiction the election was held), a notice of the pendency of the contest.
If the contest relates to an office involving more than one county, the venue of the contest is (a) in the county in which the alleged grounds of the contest exist or (b) if grounds for the contest are alleged to exist in more than one county, then in any of those counties or in the county in which any defendant resides.
Authority and jurisdiction are hereby vested in the circuit court, to hear and determine primary contests. When a petition to contest a primary is filed in the office of the clerk of the court, the petition shall forthwith be presented to a judge thereof, who shall note thereon the date of presentation, and shall note thereon the day when the petition will be heard, which shall not be more than 10 days thereafter.
Summons shall forthwith issue to each defendant named in the petition and shall be served for the same manner as is provided for other civil cases. Summons may be issued and served in any county in the State. The case may be heard and determined by the circuit court at any time not less than 5 days after service of process, and shall have preference in the order of hearing to all other cases. The petitioner shall give security for all costs.
Any defendant may file a counterclaim in the same manner as in other civil cases .
The court shall ascertain and declare by a judgment to be entered of record, the result of such election . The judgment of the court shall be appealable as in other civil cases. A certified copy of the judgment shall forthwith be made by the clerk of the court and transmitted to the election authority canvassing the returns for such office, and in case of contest, if for nomination for an office, tabulated statements of returns for which are filed with the State Board of Elections, also in the office of the election authorities having jurisdiction . The proper election authority or authorities , as the case may be, shall correct the returns or the tabulated statement of returns in accordance with the judgment.
10 ILCS 5/7-63