A severe storm has killed 16 people and derailed a passenger train in northern Bangladesh.

Police and government officials said the storm tore through scores of villages close to the border with India overnight on Sunday, uprooting trees and electricity poles and derailing a train in an incident that injured dozens of passengers.

Nine people were killed in the worst-hit district of Netrokona, six died in neighbouring Sunamganj, and one person died after being struck by lightning in nearby Naogaon, police in all three districts said.

Among the nine killed in Netrokona was a pregnant woman and her three children, district police official Rashel Miah said.

"They died after a side wall fell on them," Miah told the AFP news agency, adding that up to 20 people were injured in the district.

About 1,000 homes mostly made of mud and tin were flattened, government administrator Abul Kalam Azad said.

The storm also derailed a train at Tangail district while it was travelling across a bridge over a river.

"The storm was so severe that it threw the train, carrying up to 500 passengers, off its tracks and against a wall," railway official Pankaj Kumar Saha said.

Storms known locally as Kalboishakhi often hit Bangladesh during the early summer months in the lead-up to the monsoon that generally begins in the first week of June.