The fifth boy was treated at Brigham City Community Hospital and released.
Nelson said the five boys were outside a house near 2200 S. Linda Way (1000 West) after school. Nelson heard from the police that one of the boys was igniting a can of gasoline, triggering an explosion.
None of the boys lives at the house, said Perry police Sgt. Scott Hancey, although at least one adult was inside.
Among the boys was Blake Nelson's grandson, 7-year-old Tayton Winward, who he said was one of the more severely burned boys.
Tayton and three other boys were walking home from school when they saw gas cans outside a neighbor's house. The home is about four doors away from Blake Nelson's, where Tayton and his parents are temporarily living.
Blake Nelson said he does not know exactly what happened, but the gas exploded. He believes that the fifth boy was walking home some distance behind the main group and ran over when he saw the flames to try to help them.
Tayton ran home screaming.
"His mother turned around and asked what's wrong and saw that he was burned," Blake Nelson said. She grabbed him, jumped in the car and drove him to the hospital.
A passing UPS driver saw the boys on fire and stopped to help. Emergency responders arrived within minutes, the mayor said.
"It's sad," Jerry Nelson said. "Our thoughts are with the boys and their families."
Lesha Dalebout lives near the house where the fire erupted. She was coming home from work and saw the UPS driver and the resident of the house trying to help the boys.
Dalebout said the home's resident said "she could feel her house shake" when the can exploded.
Three of the boys ran home, Dalebout said, while two remained on the grass. Dalebout said one boy had what resembled a bad sunburn on his face and singed hair.
The other boy had burns on his legs.
"He was just crying and screaming," Dalebout said.
Reporter Bob Mims contributed to this story