The VNUP became the largest party in parliament in the July 2004 parliamentary elections, with 10 of 52 seats. Ham Lin̄i became a candidate for Prime Minister, but was defeated by Serge Vohor, though Lin̄i also had the support of the largest faction of the Vanua'aku Pati, led by outgoing Prime Minister Edward Natapei. He continued to dispute the results and lead the opposition to the Vohor government until 20 August 2004, when Vohor and Lin̄i formed a National Unity Government, in which Vohor remained Prime Minister and Lin̄i became Deputy Prime Minister and Minister of Internal Affairs.