Officers entered the house, located the injured resident and a firearm, and began providing emergency medical care, the police said. The woman was pronounced dead at the scene.

The woman, Atatiana Jefferson, 28, who was black, died in her bedroom at 2:30 a.m., according to the Tarrant County Medical Examiner’s Office. The Fort Worth Police Department did not release the officer’s name, but disclosed that he was white and had been with the department since April 2018.

James Smith, Ms. Jefferson’s neighbor, told WFAA-TV in Dallas that he had called the police to check on her well being.

He told the police that two vehicles were in her driveway but that the door to the house was wide open, which was abnormal, according to call details released by the police.

There was “no domestic violence, no arguing, nothing that they should have been concerned with as far as them coming with guns drawn to my neighbor’s house,” Mr. Smith said.