A Tennessee father was detained Wednesday after his four young children were killed in a fire that broke out in their Memphis apartment, authorities said.

Firefighters responded just before 3 p.m. to a two-story apartment building in the Washington Heights area, the Memphis Fire Department said. About 50 firefighters battled the blaze for nearly 30 minutes before the fire was under control.

The fire appeared accidental and is believed to have sparked from rigged wiring between the kitchen and bedroom, local news outlets reported.

A witness told Local Memphis that he attempted to run into the building, but the flames were too high, and he was blown back.

85-YEAR-OLD NJ MAN, PASSERBY HELP SAVE FAMILY FROM HOUSE FIRE

authorities and residents at scene of fire

Four children, including a 6-year-old, a 2-year-old and two 4-year-olds, were found inside a back bedroom during rescue operations, according to the fire department. (FOX13 Memphis)

Four children, including a six-year-old, a two-year-old and two four-year-olds, were found dead inside a back bedroom during rescue operations, according to the fire department.

fire truck at scene of apartment fire

The blaze broke out in a two-story apartment building in the Washington Heights area of Memphis just before 3 p.m. Wednesday. (FOX13 Memphis)

The children’s grandfather, Patrick Davis, identified the children to WREG-TV as Marcus, Markese, Malaysia, and Makayla Walker.

police and fire officials at scene

Authorities have detained the children's father, who was home at the time of the fire, but no charges were immediately filed. (FOX13 Memphis)

"It hurt me to see my daughter hurting and it hurts me, and it’s hurting my whole family," he said.

TEXAS FIREFIGHTER TABBED WHILE PUTTING OUT EARLY MORNING FIRE ON I-35

The grandfather told FOX13 Memphis that one of the children had just celebrated a birthday a day earlier.

Davis said the children’s mother had gone to run an errand and left them home with their father.

CLICK TO GET THE FOX NEWS APP

Memphis police said they detained the father, but his name and other details weren't immediately released. No charges were immediately filed.

The Associated Press contributed to this report.