KABUL (Reuters) - Afghanistan’s Supreme Court has ruled that President Ashraf Ghani can stay in office until a much-delayed presidential election, which is due to be held after his mandate expires next month, officials said.

FILE PHOTO: Afghanistan's President Ashraf Ghani attends a meeting with U.S. Vice President Mike Pence during the annual Munich Security Conference in Munich, Germany February 16, 2019. REUTERS/Michael Dalder/File Photo

The election, originally scheduled for April this year, has been postponed twice to allow more time to organize the poll, first to July and then to Sept. 28, well after the official end of Ghani’s five-year term on May 22.

Amid growing division in Kabul, opposition politicians demanded he step down as soon as his mandate ends and give way to an interim government to oversee peace talks with the Taliban. Ghani, seeking a second term, has ruled that out.

Government officials, speaking on condition of anonymity, confirmed the court decision, but the way the news was announced underscores the confusion in Afghan politics as Ghani’s term nears its end.

Television station Ariana TV first carried the news on Sunday, citing a court document ruling that the constitution allowed the president to remain in office until the election.

However, with political rivals attacking the move and accusing the government of imposing the ruling, the court refused to confirm the decision, saying it was for the government to announce.

The presidential palace press office said only the court could announce its own decision.

In a short video statement it said that the government remaining in office for another six months was in line with what happened before elections in 2009 and 2014.

Atta Mohammad Noor, leader of the Jamiat-e Islami party and a former provincial governor who remains one of the most powerful figures in Afghan politics, said the decision was “unlawful” and undermined the authority of the Supreme Court.

“(Ghani’s) tenure ends in May and that’s it,” a message on Atta Noor’s Twitter account said. He called on presidential candidates, lawyers and legislators to “elaborate on this” but did not say whether he would mount a legal challenge.

The confusion came just days after a planned meeting between Taliban representatives and a 250-strong group of Afghan officials and civil society figures was canceled amid recriminations over the size and status of the delegation.

Ghani took office in 2014 at the head of a unity government including his rival, Abdullah Abdullah, after a bitterly disputed election that was tainted by significant voter fraud and which left no clear winner.