Image copyright AP Image caption Despite the national symbols, deep divisions have been exposed in the country in recent months

Thailand's main opposition party has petitioned the Constitutional Court to annul Sunday's general election.

The Democrat Party's petition also calls for the dissolution of the ruling Pheu Thai party.

It argues that the polls violated the constitution on several grounds, including that they were not completed in one day.

The government blames opposition polling station blockades for the delays.

Thailand's troubles Sep 2006: Army ousts Thaksin Shinawatra

Army ousts Thaksin Shinawatra Dec 2007: Pro-Thaksin party wins election

Pro-Thaksin party wins election Aug 2008: Thaksin flees Thailand

Thaksin flees Thailand Dec 2008: Huge anti-Thaksin protests; court bans ruling party; Abhisit Vejjajiva comes to power

Huge anti-Thaksin protests; court bans ruling party; Abhisit Vejjajiva comes to power Mar-May 2010: Huge pro-Thaksin protests; dozens killed in army crackdown

Huge pro-Thaksin protests; dozens killed in army crackdown Jul 2011: Yingluck Shinawatra, sister of Thaksin, elected PM

Yingluck Shinawatra, sister of Thaksin, elected PM Nov 2013: Anti-government protests

Anti-government protests Dec 2013: Ms Yingluck calls election

Ms Yingluck calls election Jan 2014: Ms Yingluck declares state of emergency Crisis explained in 60 seconds The battle for Thailand's soul In pictures: Thailand votes Q&A: Thailand protests

Thailand's election law also allows voting to be re-run where it has been disrupted.

Legal experts say there is no real case for annulling the election but the Constitutional Court has a history of ruling against the party of the Prime Minister Yingluck Shinawatra.

It annulled an election eight years ago, and has twice dissolved the party and banned its top politicians from office.

The Democrats say they are confident they will win in court again.

If that happens, the prime minister's supporters in her strongholds of the north and northeast, say they will refuse to recognise whatever government replaces her.

In calling the elections the prime minister hoped to defuse large anti-government protests that began in the capital three months ago.

But the opposition boycotted them and anti-government protesters forced the closure of hundreds of polling stations in Bangkok and the south, stopping millions of people from voting and preventing the announcement of a result until special elections are held in areas that have not yet voted.

Voting was peaceful at 90% of polling stations.

Wiratana Kalayasiri, a former opposition lawmaker and head of the Democrat Party's legal team, said: "This election has violated the constitution on several counts, but mainly it was not a fair one."

"The election was not held on the same day... That is why we are seeking to nullify it," he said.

The opposition is also expected to ask the court to disqualify Pheu Thai party executives and ban cabinet members who were party candidates.

There is a deep divide between supporters of the Prime Minister and her opponents, who allege her government is corrupt and that she is a puppet of her brother, ousted Prime Minister Thaksin Shinawatra.

A billionaire, he fled into exile to avoid corruption charges after being deposed in a 2006 coup.

Image copyright Getty Images Image caption Anti-government protesters have been occupying parts of Bangkok since last year

Most of the protesters, who have occupied government ministries and major intersections during their demonstrations, want the government to be replaced by an unelected "people's council'' to enact reforms ahead of new elections.

They also want the Shinawatra family's influence permanently removed from Thai politics.

The prime minister has refused to step down, arguing she was elected by a large majority, and that she is open to reform, but that such a council would be unconstitutional and undemocratic.

Rice blow

The legal bid comes as China pulls out of a contract to buy 1.2 million tonnes of rice from Thailand.

Thailand's Ministry of Commerce said the Chinese government pulled out of the deal because of an ongoing probe by the country's Anti-Corruption Commission into the Prime Minister's rice purchase policy.

The policy, in which the government buys farmers' crops at prices up to 50% higher than world prices, has been a factor in the recent anti-government protests.

Many of the protesters are urban, middle-class Thais, who allege the scheme is just a way to buy the votes of people in poorer, rural areas, with state money.

The ruling party - under various names - has won the last five elections, with strong support from its rural support base.

But now the government needs to sell its rice stocks to pay farmers, many of whom have not been paid for their October crop, and some of whom have threatened to join the anti-government demonstrations in Bangkok.