Sri Lanka's main Muslim party has quit the government and pledged support to the opposition in a move seen as the biggest setback yet to President Mahinda Rajapaksa's re-election bid.

The Sri Lankan Muslim Congress leader, Rauf Hakeem, also announced his own resignation as justice minister and said he would now work for the victory of Maithripala Sirisena, the opposition candidate, in the January 8 election.

Hakeem said they left the government because of widening rifts over a 2010 law that lifted the two-term limit on the presidency and gave Rajapaksa wide powers over the police, the judiciary and the civil service.

"Good governance is the main issue for us," Hakeem told reporters. "We are guilty of compliance [in voting for the 2010 statute], but now we want to redress the situation."

'Religious intolerance'

Ameer Faaiz, a leading member of the party that represents minority Muslims in predominantly Buddhist country, cited the Rajapaksa administration's "intolerance toward religious minorities" and disagreement with his style of rule.

Rajapaksa's government had come under heavy criticism in recent years for backing extremist Buddhist groups and turning a blind eye on the recent anti-Muslim violence.

There was no immediate comment from the government on the resignations, but a ruling party source told the AFP news agency that the defection of the Muslim party was the biggest blow to their campaign.

Muslims, the second largest minority in the island after Hindu Tamils, account for about 10 percent of the electorate and could emerge as king-makers in January's presidential election if the majority Sinhalese are split down the middle.

Both Rajapaksa and Sirisena are members of the majority Sinhala Buddhist community.

Hakeem has become the second Muslim minister to quit Rajapaksa's government after industry and commerce minister Rishad Bathiudeen resigned.

Sirisena himself defected to the opposition last month after giving up his portfolio as minister of health.