*
Voting ended at 1000 GMT, results by early Monday
*
Turnout about 40% compared with over 80% in 2018
*
PM Hasina's Awami League set for fourth straight term
*
Main opposition BNP boycotting poll
(Adds details from election commission, opposition comment)
By Sudipto Ganguly and Ruma Paul
DHAKA, Jan 7 (Reuters) - Bangladeshis largely stayed away from the polls in a general election on Sunday set to give Prime Minister Sheikh Hasina a fourth straight term, after a vote boycotted by the main opposition party and marred by violence.
Rights groups have warned of virtual one-party rule by Hasina's Awami League in the South Asian country of 170 million people after the boycott by the Bangladesh Nationalist Party (BNP) and some smaller allies.
The United States and Western nations, key customers of Bangladesh's garment industry, have called for a free and fair election, the 12th since independence from Pakistan in 1971.
Turnout was about 40% when polls closed, said chief election commissioner Kazi Habibul Awal, compared with over 80% in the last election in 2018. Initial results are expected early on Monday.
Voting was cancelled at seven centres due to irregularities while the candidature of an Awami League contestant was cancelled for threatening security officials, said Jahangir Alam, secretary of the commission.
The BNP, boycotting the second of the past three elections, says Hasina's party is trying to legitimise a sham vote. She refused BNP demands to resign and allow a neutral authority to run the election, accusing the opposition of instigating anti-government protests that have rocked Dhaka since late October and killed at least 14 people.
The BNP called a two-day strike nationwide through Sunday, asking people to shun the election.
"The people of the country boycotted the government by not going to the polling booths," said BNP leader Abdul Moyeen Khan, adding the opposition's boycott call was a success.
In her latest 15 years in power, Hasina, 76, has been credited with turning around Bangladesh's economy and the key garment industry. But critics accuse her of authoritarianism, human rights violations, crackdowns on free speech and suppression of dissent.
At least four people were killed on Friday in a passenger train fire that the government called arson. Several polling booths, schools and a Buddhist monastery were set ablaze days before the poll.
A person in Munshiganj, south of the capital Dhaka, was hacked to death on Sunday morning, district police chief Mohammad Aslam Khan said, adding it was unclear if the killing was related to political violence.