Supporters of Pakistani politician Imran Khan, chief of Pakistan Tehreek-e-Insaf party, celebrate projected unofficial results that were announced by television channels indicating their candidates' success in the parliamentary elections in Islamabad, Pakistan, Wednesday, July 25, 2018. (AP Photo/B.K. Bangash)

Supporters of Pakistani politician Imran Khan, chief of Pakistan Tehreek-e-Insaf party, celebrate projected unofficial results that were announced by television channels indicating their candidates' success in the parliamentary elections in Islamabad, Pakistan, Wednesday, July 25, 2018. (AP Photo/B.K. Bangash)

ISLAMABAD (AP) — Pakistanis voted for a new government Wednesday in an election marred by violence and allegations of fraud. The winner will face a crumbling economy and bloodshed by militants whose latest attack saw a suicide bomber kill 31 people outside a polling station.

Electoral authorities said official results declaring an outright winner were not expected before late Thursday morning. However, early unofficial results gave cricket star Imran Khan and his Pakistan Tehreek-e-Insaf Party a commanding lead over his main rival, Shahbaz Sharif’s Pakistan Muslim League.

ADVERTISEMENT

Jubilant Khan supporters danced to the beat of drums at his party headquarters in Islamabad, sensing a victory. The sound of fire crackers echoed in the night sky.

Sharif, the younger brother of disgraced Prime Minister Nawaz Sharif, who has been jailed on corruption charges, disputed the election results even before they were announced. He charged fraud and vowed not to accept the results, generating fears that disgruntled losers could delay the formation of the next government.

The parliamentary balloting marked only the second time in Pakistan’s 71-year history that one civilian government has handed power to another in the country of 200 million people. There also have been widespread concerns during the election campaign about manipulation by the military, which has directly or indirectly ruled the country for most of its existence.

“We will sweep the elections,” said Abdul Basit, a supporter of Khan’s, who watched the results on a large TV screen.

Hours after the polls opened, a suicide bomber on a motorcycle detonated his explosives in a crowd waiting to vote in the southwestern city of Quetta. In addition to the 31 dead, the attack wounded 35 people, said Dr. Jaffar Kakar, a hospital official. No one immediately claimed responsibility, but local officials were quick to blame the Islamic State group.

The attack in Quetta, the capital of Baluchistan province, underscored the difficulties the majority Muslim nation faces on its wobbly journey toward sustained democracy.

Baluchistan also saw the worst violence during campaigning earlier this month, when a suicide bomber struck at a political rally, killing 149 people, including the candidate Siraj Raisani. Another 400 were wounded. IS claimed responsibility for that attack. Baluchistan has seen relentless attacks, both by the province’s secessionists and Sunni militants who have killed hundreds of Shiites there.

ADVERTISEMENT

The military deployed 350,000 troops at polling stations across the country.

Moeed Yusuf, associate vice president of the Asia Center at the Washington-based U.S. Institute of Peace, said politically motivated mob violence is rare in Pakistan, while Wednesday’s attack in Baluchistan appeared to be the work of a terrorist group.

“Terrorist violence is a different issue altogether and is unlikely to affect political stability,” Yusuf said. “Unfortunately, Pakistanis have gone through so much violence that they are desensitized to it.”

Yusuf said the top challenge for the next government will be the economic crisis.

“The new government is going to be in an unenviable position, and especially Imran Khan, as he is not the preferred prime minister for Pakistan’s two traditional chief patrons, China and the U.S.”

Khan has been an outspoken critic of the U.S.-led war in neighboring Afghanistan as well as China’s massive investment in Pakistan, which has racked up millions of dollars in debt to Beijing.

Khan’s supporters showered his vehicle with rose petals as he arrived to vote near his home in the capital of Islamabad. Afterward, he appealed to Pakistanis to vote in huge numbers “to save future generations.”

As polls closed, Election Commission spokesman Nadeem Qasim told The Associated Press that the commission had told Khan that his vote could be disqualified because he cast his ballot in front of TV cameras, violating constitutional provisions on “the secrecy of the ballot paper.” Video images showed a smiling Khan with his ballot in front of him as he marked it.

As early results gave Khan an edge, Maryam Aurangzeb of Sharif’s Pakistan Muslim League raised the first allegations of ballot fraud and warned that his supporters might revolt if the charges prove correct.

“We will not allow anyone to steal the mandate the nation has given to us,” she told a news conference. “So far, we are controlling our supporters, but we won’t be able to convince them to exercise restraint if the results were manipulated against our party.”

As voting ended, festive supporters of both parties gathered outside polling stations, dancing to the beat of drums.

The third-largest party is the left-leaning Pakistan People’s Party, headed by Bilawal Bhutto, the son of late Prime Minister Benazir Bhutto, assassinated by the Pakistani Taliban, whom she had vowed to eradicate.

More than 11,000 candidates are vying for 270 seats in Pakistan’s law-making National Assembly, the lower house of parliament, and 577 seats in four provincial assemblies. Under Pakistani law, separate seats are reserved for women and for non-Muslim minorities, which comprise 4 percent of the population.

The 85,307 polling stations were open for 10 hours, an hour longer than in 2013. Voting for two parliamentary seats and six seats in provincial assemblies has been postponed due to attacks on candidates or disqualifications. Final results are expected early Thursday.

There are more than 105 million eligible voters — 59 million men and 46 million women.

Election officials reminded candidates their results will be nullified if the female voter turnout didn’t reach 10 percent. The requirement was imposed after the 2013 elections, when several areas banned voting by women, mostly in the religiously conservative northwest. Some candidates won without a single woman marking a ballot.

Rights activist Tahira Abdullah said Tuesday that local jirgas, or councils of elders, from 60 areas representing 16 different constituencies had signed agreements banning women from voting despite the new ruling.

Women voted for the first time Wednesday in Pakistan’s deeply tribal and religiously conservative North Waziristan, where Taliban insurgents have found safe havens.

“We made history today,” said Mohamad Ayaz Khan, a government administrator. “It is the first time that women have come out of their homes to cast their vote.”

Voting is segregated by gender throughout Pakistan at every polling station.

Early voting was heavy at some sites in Islamabad and also in the Punjab provincial capital, with several political party leaders lining up to cast ballots. Local TV reported scattered incidents of police arresting people with pre-marked ballots.

A concern is the unprecedented participation of radical religious groups, including those banned for links to terrorism but resurrected under different names. That has led to worry by minorities and women ahead of the voting.

Jibran Nasir, an independent candidate from the financial hub of Karachi, said he received death threats and even had a fatwa, or religious edict, issued against him. He had refused to condemn Ahmadis, reviled by mainstream Muslims as heretics because they believe the messiah promised in Islam arrived over a century ago. In 1974, Pakistan declared Ahmadis to be non-Muslims.

International and domestic election observers will monitor the voting. The European Union Election Observation Mission has 120 monitors in major centers across Pakistan, with the exception of Baluchistan.

Also Wednesday, shooting between supporters of two opposing political parties killed one person and wounded two in a village near the northwestern city of Swabi. Later, more clashes between rival parties killed another person and wounded 15 elsewhere.

___

Associated Press writers Zarar Khan and B.K. Bangash in Islamabad; Abdul Sattar in Quetta, Baluchistan; Zaheer Babar in Lahore; Adil Jawad in Karachi, Pakistan and Riaz Khan in Peshawar, Pakistan, contributed to this report.