There was no shortage of potential candidates from the BN coalition; the English daily The Star had quoted MIC president S. Samy Vellu that 23 MIC members have expressed interest to contest the by-election. However, the two leading favourites were said to be MIC central working committee members S. Murugesan and T. Mohan. Other names bandied by the media included teacher and MIC Kuala Selangor division chief P. Thirumoorthy, Shah Alam division vice-chairman S. Muruga Vellu and Kota Raja deputy chief R. Subramaniam. However, on 16 April 2007, the BN picked a relative unknown, former teacher K. Parthiban as its by-election candidate. The selection prompted the MIC Kuala Selangor division chief P. Thirumoorthy, a relative party heavyweight on the candidate shortlist to quit the MIC, only to backtrack and declare his support for Parthiban two days later.
Opposition
Meanwhile, the two major opposition parties, the Pan Malaysian Islamic Party and the Democratic Action Party, in a rare display of opposition solidarity, both threw their support behind the PKR for the by-election. PKR's campaign will be led by party adviser and former Deputy Prime MinisterAnwar Ibrahim. The leading potential candidate was current party treasurer and former Kumpulan Guthrie Bhd and Permodalan Nasional Bhd CEO Khalid Ibrahim, although some PKR members lobbied for an Indian candidate. Eventually, the party announced that it had shortlisted Khalid and Indian bureau head K.S. Nallakarupan for its ticket. Later on 17 April 2007, it was announced that, as expected, Khalid would be the PKR nominee. Nallakarupan said that although PKR President Wan Azizah Wan Ismail had offered him the nomination, he declined in favour of Khalid. Azizah denied allegations of racial bias in the decision, stating: "We picked the candidate not on racial lines but on the basis of the most appropriate choice to be the people's voice in the state assembly".
Independent candidates
On 15 April 2007, Klang-based businessman K. Loganathan announced he would contest as an independent candidate in the by-election, citing the lack of development and progress under the previous assemblyman and his desire to serve the rural folk of Ijok as reasons. By 18 April 2007, rumours were rife that a plethora of independent candidates will be contesting the by-election. Independent onlinenews daily Malaysiakini reported as many as four independent candidates, including Loganathan, have expressed interest to contest.
Nominations
On 19 April 2007, the candidates from BN and PKR filed their nominations at the Batang Berjuntaicommunity hall, which was converted into a temporary nomination centre. Neither Loganathan nor any of the purported independent candidates appeared, and thus after the nomination period ended at 11.00 am, returning officer Haris Kasim announced that the by-election would be a straight fight between K. Parthiban of the MIC and Khalid of PKR. The nomination was marred by a clash between BN and PKR supporters when their processions to the nomination centre inadvertently met. Eventually, the police intervened and separated the two groups. PKR later accused that Khairy Jamaluddin, Deputy BN Youth Chief, had been involved in provoking the fight, and also that BN Youth Chief and Education Minister Hishamuddin Hussein had thrown bottles at PKR supporters. However, no valid reports was actually made. The Prime Minister had later warned both PKR and BN supporters of their behaviour during the by-election of Ijok.
By-election results
The BN candidate, K. Parthiban, won with a majority of 1,850 votes. Parthiban secured 5,884 votes while Keadilan's Abdul Khalid Ibrahim got 4,034 votes. A total of 10,052 voters, or 81.9%, of the 12,272 eligible voters had cast their ballots, a record turnout for the constituency. In the 2004 General Elections, BN defeated PKR by 1,649 votes in the constituency.