A person who was pulled from the upper floor of a Northwest Washington home after a fire broke out has died, officials said Thursday.

The single-family house in the 5200 block of Western Avenue NW caught on fire Tuesday afternoon, the fire department said.

D.C. police have not identified the victim or specified when the person died.

Two firefighters suffered minor injuries, the department said. By 6 p.m., officials said, the fire had been “knocked down.”

According to the department, investigators determined that the fire “was accidental” and resulted from “an unspecified electrical event.”

It was the second time in a day that a serious fire broke out in homes where D.C. Fire officials said there was a “non-functional smoke alarm.” Officials with the fire department reminded the public in a Twitter message to test smoke alarms regularly.

Vito Maggiolo, a spokesman for D.C. Fire, said the batteries were dead in the smoke detector at the home on Western Avenue.

Early Tuesday, an elderly woman died after a house fire broke out in the 2200 block of Lawrence Street NE.

In November, two people died in a fire in a house about a half-mile away on the other side of Western Avenue, in Bethesda. The street forms the boundary between the District and Montgomery County.

Two people found dead in Maryland home in murder-suicide, police say

D.C. man charged with murder in May stabbing

Fatal fire hits home in Northeast Washington

Local newsletters: Local headlines (8 a.m.) | Afternoon Buzz (4 p.m.)

Like PostLocal on Facebook | Follow @postlocal on Twitter | Latest local news

Dana Hedgpeth contributed to this report.