KUALA LUMPUR (Reuters) - A Malaysian court on Wednesday sentenced an opposition lawmaker to jail for revealing confidential bank details in a 2012 graft scandal, a potential blow on the opposition ahead of national polls that must be held by August.

Rafizi Ramli is a senior leader with the People’s Justice Party (PKR) and the ruling could dent the opposition challenge to scandal-tainted Prime Minister Najib Razak in the elections.

Elected representatives are disqualified from office and barred from contesting elections if sentenced to at least six months’ jail or fined at least 2,000 ringgit. Another PKR lawmaker is appealing against a 3,000 ringgit fine.

Rafizi was handed a 30-month jail term for revealing to the media bank details of the National Feedlot Corp (NFCorp) and a top executive of the company which was tasked by the government with boosting cattle production, state news agency Bernama said.

Rafizi had at the time alleged that executives at NFCorp had misappropriated about 250 million ringgit($64 million) of public funds in what the media had called the “cow gate” scandal.

The judge granted a stay of execution of the sentence to allow Rafizi to appeal the decision.

Najib faces an unprecedented challenge from his former mentor, former prime minister Mahathir Mohamad, whom the opposition have named as their leader.

Mahathir, 92, turned on Najib in 2015 over the prime minister’s handling of a multi-billion dollar scandal linked to state fund 1Malaysia Development Berhad (1MDB).

In civil lawsuits, the U.S. Justice Department has alleged that about $4.5 billion was misappropriated from 1MDB. The Malaysian fund has denied any wrongdoing and Najib, who founded 1MDB, has denied all allegations of corruption against him.

($1 = 3.9040 ringgit)