Islamabad, Pakistan (CNN) A bomb attack outside a polling station in the city of Quetta killed at least 31 people and injured dozens more Wednesday as Pakistanis voted in a fiercely contested general election.

ISIS claimed responsibility for the attack, but CNN could not verify this assertion.

The bombing is the latest in a series of deadly attacks that have marred the campaign; a suicide bombing in the same province earlier this month killed 150 people and led to suggestions the election should be delayed.

Pakistani volunteers and security officers visit the site of the bombing Wednesday in Quetta.

Wednesday's vote, which pits former cricket star Imran Khan's party against that of jailed former premier Nawaz Sharif, is only the second time in Pakistan's 71-year history that the country has seen a democratic transition of power. It has been overshadowed by growing fears of political instability , hundreds of arrests and accusations of widespread interference by the military.

Khan, who has presented himself as a "change" candidate, condemned the Quetta blast, saying in a tweet that "enemies of (Pakistan are) seeking to disrupt our democratic process," and calling on supporters to cast their vote.

Cricket star-turned-politician Imran Khan arrives at an Islamabad polling station to vote Wednesday.

As results began to come in Wednesday evening, leaders of almost every political party except Khan's Pakistan Tehreek-e-Insaf alleged vote rigging, with some claiming their monitors did not receive final tallies or were asked to leave polling stations before tallying was finished.

Election Commission of Pakistan Secretary Babar Yaqoob rejected the claims, saying in a statement that polling agents whose parties were not performing well were leaving the stations without taking the forms.

Partial results late Wednesday showed Khan's party with a sizable lead, PTV reports.

Khan's supporters celebrate Wednesday in the streets of Lahore.

Despite only 10% to 15% of the votes having been counted, Khan's supporters were already snarling traffic in Islamabad and celebrating in the streets of Lahore, dancing and waving flags bearing his image.

Security was ramped up outside Khan's residence in the capital, Islamabad, said Najeeb Ur Rehman Bugvi, senior superintendent of police.

Army officials said that more than 370,000 troops had been deployed to ensure a "fair and free" election, with police estimating the total security force at 800,000 personnel -- backed up by flying surveillance drones in some areas.

Security concerns

Pakistani soldiers stand guard Wednesday as election officials count ballots at a Lahore polling station.

The run-up to the vote has been dogged by increasing tensions over allegations that the powerful military has secretly backed Khan, a massive crackdown on the media and the electoral participation of militant groups.

The Human Rights Commission of Pakistan has expressed "serious reservations about the extraordinary powers accorded to security forces" and called the election "the dirtiest" in the country's history.

After polls closed, military spokesman Maj. Gen. Asif Ghafoor thanked Pakistanis for proving their "love & respect" for the armed forces and other law enforcement by going to the polls.

You have "rejected all kinds of malicious propaganda. We are strong because we have your unflinching support," he tweeted in a veiled reference to allegations of military interference.

Khan has repeatedly denied accusations he is supported by the military and condemned the harassment of election candidates.

The former Pakistan cricket captain said he had voted, telling reporters: "I am a sportsman; I'm not going to declare victory until the last bowl has been bowled."

Tight race

With the incumbent Pakistan Muslim League-Nawaz still on the back foot after Nawaz Sharif's imprisonment, the election represents a real chance for Khan's center-right Pakistan Tehreek-e-Insaf, or PTI, to break into the two-party system that has traditionally dominated national politics.

People gather outside an election office of a candidate Wednesday as polls closed in Rawalpindi.

The final result may go down to the wire, however, leaving candidates in coalition negotiations, either with the once-dominant Pakistan People's Party -- led by the 29-year-old Bilawal Bhutto Zardari, son of former President Asif Ali Zardari and Benazir Bhutto -- or with some of the wide array of smaller parties.

These parties, including some religious groups, could assume a new level of importance if Khan or another candidate need to rely on them to form a coalition government. Far-right Islamist parties are among these fringe groups, including some known to be sympathetic to militants.

Khan has built on his sports celebrity and the PTI's success as a regional party to emerge as a change candidate, attracting religious conservatives and drilling down on Pakistan's endemic corruption -- a task made easier by Sharif's conviction.

Some analysts, however, say that Khan lacks national-level political experience to enact any meaningful reform and will be hampered by less-than-loyal allies in his party and the influence of the military

Voters wait in line Wednesday to cast their ballots at a polling station in Karachi.

Khan's supporters remain optimistic that if elected, his slogan of building a "New Pakistan" would bear fruit.

"I have just voted for PTI," said Amna Gardar in Lahore, capital of Punjab province. "If you want to be part of that change, please come out, please vote."

All eyes will be on whether Shahbaz Sharif can maintain the Pakistan Muslim League-Nawaz's grip on its stronghold in Punjab, Pakistan's most populous and richest province. It will be difficult for Khan to take power without winning Punjab. Analysts were divided over whether Nawaz Sharif's jailing would generate a sympathy vote.

Shahbaz Sharif of the Pakistan Muslim League-Nawaz casts his ballot Wednesday in Lahore.