Updated

Pakistan's main opposition party announced Friday it would boycott next week's presidential election to protest against the manner in which the vote was brought forward.

The Supreme Court ruled Wednesday that the ballot would be held on July 30 instead of August 6 after the main ruling party complained that the original date clashed with the end of Ramadan.

The head of state in Pakistan is a ceremonial position.

Many lawmakers tasked with electing a successor to President Asif Ali Zardari will be on pilgrimage or offering special prayers at the tail end of the holy fasting month, the court said.

Twenty-four candidates applied to stand in the vote, although the election of Mamnoon Hussain, the candidate for the ruling Pakistan Muslim League-N (PML-N) party is considered a foregone conclusion.

"We have been left with no alternative, but to boycott the election," said Senator Raza Rabbani, the presidential candidate for the opposition Pakistan People's Party (PPP).

"The Supreme Court did not issue us any notices, nor did they hear us or provide us an opportunity to present our point of view... a unilateral decision was made," Rabbani said.

"We see it is part of moves to impose the centre's rule again."

Pakistan's new president will be elected by members of the upper and lower houses of parliament and of four regional assemblies.

Rabbani said that the Supreme Court decision made it difficult for him and other opposition candidates to campaign in four provincial capitals and the federal capital Islamabad in just two days.

Rabbani is a highly respected senator and one of the few PPP politicians who could have commanded cross-party support in the vote, although the PML-N is expected to vote as one for Hussain.

The last PPP government had a turbulent relationship with Pakistan's top court, and Rabbani said his party would struggle against the "mindset" which interfered with the election process.

"The boycott is not the end of the story. The story begins here and we will continue our struggle against the current system and the mindset behind it," Rabbani said.

Zardari was elected after the PPP won elections in 2008 following the assassination of his wife, former premier Benazir Bhutto.

The PPP served a full five-year term in office, but lost heavily in May general elections won by a PML-N landslide.

Zardari is hugely unpopular, reviled for alleged corruption and for presiding over a government that oversaw deteriorating economic growth and increasing attacks from the Taliban.

He did, however, earn grudging admiration for managing to keep his coalition in power and for returning to the prime minister powers commandeered for the presidency under military dictatorships.

Those constitutional amendments mean that the presidency is now a ceremonial post and Hussain, a staunch loyalist of Prime Minister Nawaz Sharif, has little personal clout.