Police officers in Malvern were justified in fatally shooting a woman who pointed a gun at them during a confrontation at her home last month, the Chester County District Attorney’s Office said Thursday.

District Attorney Deborah Ryan said a Malvern police officer, whom she did not identify, used lawful force when firing three times at the woman on May 19 during an encounter that lasted less than a minute.

Ryan did not release the name of the woman, who was killed by police who went to her home to check on her welfare. A spokesperson for Ryan’s office said the woman’s name would not be released by prosecutors at the request of her family.

The officers were dispatched to the woman’s home on the 800 block of Charleston Greene after another resident there called 911 to report that the woman was having a mental health crisis, according to Ryan.

» READ MORE: Malvern police fatally shoot person who brandished gun during a welfare check, DA says

The woman had written a “goodbye” message that the caller interpreted to be a suicide note and argued when the caller suggested summoning police for a wellness check.

When the officers arrived at the home, the woman confronted them outside while holding a Glock19 9mm handgun in one hand and a cellphone in the other, according to Ryan. She told the officers she was in a “crisis situation,” and told them the incident was being recorded and streamed live on the internet.

The woman agreed to drop her handgun if the officers dropped their weapons, and the officers holstered their guns in an attempt to deescalate the situation, Ryan said.

But then the woman suddenly picked up her gun and ran inside her home, Ryan said. One of the officers followed her inside and tried to wrestle the gun away from her. During the scuffle, the woman had her finger on the gun’s trigger, Ryan said, and was waving it around near the officers.

When the officer who was wrestling with the woman was unable to disarm her, a colleague told the officer to step away. At that point, the woman pointed her gun at the officers, and the second officer fired from five feet away, striking the woman three times.

She was pronounced dead at the scene by medics.

“Based on the totality of the circumstances, it was apparent that the subject proceeded to take actions that placed all officers in imminent danger of death or serious bodily injury,” Ryan said. “By waving her firearm with her finger on the trigger while struggling over the gun, she jeopardized the lives of all present.”