Five people have been injured in a suspected arson attack on a Swedish mosque, police said, an incident which comes amid an intense debate over immigration.

Between 15 and 20 people were in the mosque in the central town of Eskilstuna on Thursday, located in the ground floor of a building in a mainly residential area, when the fire erupted.

Smoke and flames billowed from the windows as firefighters arrived at the scene.

"A witness saw somebody throw an object through the window of the building, which serves as a mosque, after which a violent fire began," police spokesman Lars Franzell said.

The five injured people were taken to hospital for treatment of injuries ranging from smoke inhalation to lacerations. One of them was in critical condition.

Franzell said police were investigating the fire as a case of arson and technicians were to be dispatched to the building on Friday. No suspect has been apprehended yet, he added.

The immigration debate in Sweden has pitted the far-right, which wants to cut the number of asylum seekers allowed into the country by 90 percent, against mainstream parties intent on preserving the Nordic country's liberal policy.

Culture and Democracy Minister Alice Bah Kuhnke said the mosque fire was a serious attack.

"If information that the fire was arson is correct it is a direct attack on freedom of religion in our country," she told the TT news agency.