The High Court of the Cook Islands on Thursday dismissed allegations of bribery and undue influence at the Murienua by-election in February, to the relief of the Democratic Party's James Beer.
An electoral petition was brought against Mr Beer by the candidate he beat, Kaota Tuariki.
On Wednesday the Court found that some voters did not qualify to vote in the by-election but the disqualification of those voters did not change the result.
It's the second time the two men have been involved in a controversial by-election.
Last year the Democratic Party began legal action contesting the outcome of September's by-election in Murienua, which Kaota Tuariki won, amid allegations of bribery and treating.
Mr Beer petitioned the result through the Court, but Mr Tuariki resigned the seat days before the scheduled hearing.
James Beer was sworn into Parliament last Monday.