Pakistan woke to electoral chaos on Thursday with the outgoing ruling party denouncing "blatant rigging" in the pivotal general election and rejecting unofficial, partial results suggesting victory for former cricket champion Imran Khan .

Results were still being tallied Thursday morning, hours after Khan's supporters took to the streets to celebrate victory in an election opponents have said the powerful military rigged in his favour.

Local media said less than half the votes had been counted more than 13 hours after polls closed, an unprecedented delay that has fuelled widespread fears over the legitimacy of the exercise.

The Election Commission of Pakistan dismissed allegations of manipulation, blaming the delay on glitches in new, untested counting software.

"These elections were 100 percent fair and transparent," said Chief Election Commissioner Sardar Muhammad Raza early Thursday as the outcry grew.

Raza did not say when election authorities would be in a position to announce the results.

Late Wednesday, the Pakistan Muslim League-Nawaz (PML-N), which had been in power since 2013, rejected the results because of "outright rigging", and vowed it would use "all political and legal options for redressal of these glaring excesses".

"Today what they have done has pushed Pakistan back 30 years... People will not bear it," the party's leader Shahbaz Sharif, brother of jailed former premier Nawaz Sharif, said in a press conference.

Other major parties also alleged fraud, including the once-dominant Pakistan Peoples Party (PPP), whose chairman Bilawal Bhutto Zardari echoed the PML-N's claim that party representatives were barred from monitoring the count, tweeting that the situation was "Inexcusable & outrageous".

Local television channels were all predicting victory for Khan's Pakistan Tehreek-e-Insaf, with the partial results giving him at least 100 seats so far in the National Assembly, the lower house.

A majority of 137 seats is needed to form a government.

Neither Imran Khan nor the military, which had been accused of seeking to manipulate the vote in his favour in the months leading up to the polls, have yet commented on the situation. Both have previously denied allegations of intervention.

The controversy follows a campaign already considered by some observers to be one of the "dirtiest" in the Pakistan's history because of the allegations against the military, and marked by the increased visibility of extremist religious parties.

'Turmoil' 

"This is complete chaos," said political analyst Azeema Cheema, who said she was "very concerned" about what comes next.

"It depends on how the civilian disobedience is being organised. You may have spontaneous riots among political party workers. Then maybe political parties will organise sit-ins and demonstrations," she told AFP.

Michael Kugelman, an analyst at the Wilson Center in Washington, shared the concern: "No matter how you slice it, the immediate post-election climate in Pakistan will be quite tense."

"I don't see any way to prevent a period of turmoil," he told AFP.

But PTI supporters were ecstatic at the projected results.

First time voter Fahad Hussain, 21, said the party had successfully lured the country's massive youth population.

"He motivated the youth," Hussain told AFP in the capital Islamabad as he hit the streets to celebrate with friends.

Wednesday's elections, conducted under high levels of security, were meant to be a rare democratic transition from one civilian government to another in the young, nuclear-armed country which has been ruled by the military for roughly half its history.

Khan, who captained Pakistan to their World Cup cricket victory in 1992, largely campaigned on ambitious promises to tackle widespread graft while building an "Islamic welfare state".

But his bid for power was dogged by widespread accusations he is benefiting from a "silent coup" by the generals.

Khan has also increasingly catered to hardline religious groups, particularly over the inflammatory issue of blasphemy, sparking fears a win for PTI could embolden Islamist extremists.

The PML-N says it is the target of the alleged military machinations. Nawaz Sharif was ousted from power last year and jailed over a corruption conviction days before the vote, removing Khan's most dangerous rival.

Some 800,000 military and police had been deployed to provide security on election day.

But it was still marred by violent attacks. The largest, a suicide bombing claimed by the Islamic State (IS) group, left at least 31 dead and 70 wounded near a polling station in Quetta, in southwestern Balochistan province.