Four children and their teacher have died in Brazil after a nursery school security guard sprayed them with alcohol and set them on fire, officials said.

It is understood the children who died were all aged four. The guard also died in the incident.

Fifty people were also injured, mostly with burns, as the blaze spread through the "Innocent People" nursery in Janauba, in Minas Gerais state, in southeastern Brazil, before it was brought under control by firefighters, according to a statement from state prosecutors.

Witnesses told media that the man, in his 50s, had been working as a night guard at the nursery for eight years.

People wait for news of victims outside Janauba's hospital

Police said officers went to the suspect's home and visited his relatives to try to understand the motive for the attack.

Brazilian President Michel Temer expressed his condolences via Twitter saying he understood "this must be an extremely painful loss" for the parents.

"I am deeply saddened by this tragedy involving children in Janauba, and I want to express my solidarity with the families," Mr Temer wrote.

Janauba, a city of 70,000, is located about 600km north of the city of Belo Horizonte.

The office of Janauba's mayor announced seven days of mourning.