The Commission on Elections (COMELEC) in the Philippines has a quasi-judicial function and judicial functions
Section 1. Jurisdiction o f the Commission on Elections. – The Commission on Elections, through any of its two Divisions, shall have exclusive original jurisdiction over all election protests involving elective regional (the autonomous regions), provincial, and city officials.
Section 2. Election protest. – A petition contesting the elections or returns of an elective regional, provincial, or city official shall be filed with the Commission by any candidate who was voted for in the same office and who Commission by any candidate who was voted for in the same office and who received the second or third highest number of votes or, in a multi-slot position, was among the next four candidates following the last ranked winner duly proclaimed, as reflected in the official results of the election contained in the Statement of Votes. The party filing the protest shall be designated as the protestant; the adverse party shall be known as the protestee.
Section 3. How Initiated. – An election protest or petition for quo warranto shall be filed directly with the Commission in ten (10) legible copies plus such number of copies corresponding to the number of protestees, within a non-extendible period of ten days following the date of proclamation.
Each contest shall refer exclusively to one office but contests for offices of the Sangguniang Pampook, Sangguniang Panlalawigan or Sangguniang Panglungsod may be consolidated in one case.