Bangladesh Prime Minister Sheikh​ Hasina's party has won the national election, the country's election commission said early on Monday local time, giving her a third straight term in a widely expected result for the leader whose actions have increasingly been criticized as authoritarian by her opponents.

The leader of Bangladesh's opposition alliance called Sunday's vote "farcical," saying any outcome would be rejected and demanding that a new election be held under the authority of a "nonpartisan government."

Opposition leader Kamal Hossain said a few hours after voting ended that about 100 candidates from the alliance had withdrawn from their races during the day.

He said the alliance would hold a meeting Monday to decide its next course.

"We call upon the Election Commission to declare this election void and demand a fresh election under a nonpartisan government," Hossain told reporters at a nationally broadcast news conference.

An army vehicle patrols Dhaka during Sunday's general election. Roads were largely empty because of a ban on vehicles except for those of election observers and journalists. (Mohammad Ponir Hossain/Reuters)

Calls to several Hasina aides seeking comment were not immediately returned.

Police said 17 people were killed Sunday in election-related violence, included seven people from Hasina's Awami League party and five from the opposition alliance. Police spokesperson Sohel Rana said more than 20 people were also injured. Bangladesh's leading English-language newspaper, the Daily Star, reported 16 people were killed in 13 districts in election-related violence.

In the run-up to the election, activists from both the ruling party and the opposition complained of attacks on supporters and candidates.

On Sunday, The Associated Press received more than 50 calls from people across the country who identified themselves as opposition supporters complaining of intimidation and threats, and being forced to vote in front of ruling party men inside polling booths.

"Some stray incidents have happened. We have asked our officials to deal with them," K.M. Nurul Huda, Bangladesh's chief election commissioner, said as he cast his vote in the capital, Dhaka.

The election campaign was marred by the arrests and jailing of what the opposition said were thousands of Hasina opponents, including six candidates for Parliament.

Rights groups sound alarm

Hasina had expressed confidence in the outcome, inviting election observers and foreign journalists to her official residence on Monday.

While rights groups sounded alarms about the erosion of Bangladesh's democracy, Hasina promoted a different narrative, highlighting an ambitious economic agenda that has propelled Bangladesh past larger neighbours Pakistan and India by some development measures.

Voters "will give us another opportunity to serve them so that we can maintain our upward trend of development, and take Bangladesh forward as a developing country," Hasina said after casting her ballot along with her daughter and sister in Dhaka.

Incumbent Prime Minister Sheikh Hasina said on Sunday that her Awami League party would 'continue the pace of development' in Bangladesh if it were to win the general election. (Daniel Leal-Olivas/WPA Pool/Getty Images)

Hasina's main rival was former prime minister Khaleda Zia, the leader of the opposition Bangladesh Nationalist Party, who a court deemed ineligible to run for office because she is in prison for corruption.

The two women have been in and out of power — and prison — for decades.

In Zia's absence, opposition parties formed a coalition led by Hossain, an 82-year-old Oxford-educated lawyer and former member the Awami League.

Both sides were hoping to avoid a repeat of 2014, when Zia and the Bangladesh Nationalist Party boycotted elections and voter turnout in the South Asian nation of 160 million was only 22 per cent. More than half of the 300 parliamentary seats were uncontested. The Awami League's landslide victory was met with violence that left at least 22 people dead.

On Sunday, some 104 million people in the Muslim-majority country were eligible to vote, including many young, first-time voters.

Polls closed

Walking with a cane, Hossain cast his vote near his home in Dhaka, saying that he was receiving complaints about vote-tampering and intimidation from various parts of the country.

The more than 40,000 polling stations closed at 4 p.m. Sunday and counting began soon afterward.

At a polling station in the ancient city of Panam Nagar, just outside Dhaka, some 1,600 people cast their ballots as voting came to an end.

One of the voters, 70-year-old Haji Abdul Malek Mia, said he wanted to see someone in power who would offer development. "Whoever is doing development, he should be there," he said.

About 600,000 security officials, including army and paramilitary forces, have been deployed across the country in a bid to contain violence in Bangladesh's 11th general election. Bangladesh's telecommunications regulator shut down mobile internet services nationwide to prevent possible protests from organizing.

The normally traffic-clogged streets of the capital were largely empty because of a ban on vehicles for everyone except election observers and journalists. Many residents of Dhaka had left days earlier to vote in their hometowns.

At one polling station, Istiaq Ahmed, a doctor in Dhaka, said it was critical that people "select the right government to maintain the development and enrich our country further."

Sultana Rajia Rotna said she went out to vote after hearing that the streets of Dhaka were peaceful.

"I think the country has already developed much and it will be developed more," she said in Bengali. "That's why I'm here casting my vote."