Police fatally shot a woman who confronted officers with a handgun in South Berwick on Thursday afternoon, according to the police chiefs of South Berwick and York.

York police were called just before noon by a local medical facility, which reported that a woman was on the phone threatening suicide and saying she had a gun, York Police Chief Doug Bracy and South Berwick Police Chief Dana Lajoie said at a news conference Thursday evening.

“She related she had a handgun and she was going to use it and if she saw police she was going to confront them,” said Bracy, who released a statement Thursday night identifying the woman as Karin S. Moller, 55.

Police went to Moller’s house at 130 Ogunquit Road in York, setting up outside after determining that she was alone inside. Police communicated with a member of Moller’s family, who confirmed she had threatened suicide, Bracy said.

The chiefs said Moller got into her white Nissan Pathfinder just before 1 p.m. and drove from the home.

Fearing that she posed a danger to the public or might initiate a high-speed chase, police deployed a spike mat to deflate her tires as she drove on Ogunquit Road into South Berwick, which abuts the New Hampshire border. She stopped about a quarter-mile later in the middle of the road in a rural area where there are few houses.

Bracy and Lajoie said a South Berwick police officer in a cruiser pulled up behind Moller’s SUV. She got out of the vehicle, pointed a gun at the officer and walked toward him, they said.

At the same time, a York police officer pulled up in a cruiser and got out.

“Shots were exchanged at that time,” Bracy said.

Both officers fired their weapons at Moller, the chiefs said. She was taken to Portsmouth Regional Hospital in New Hampshire, where she was pronounced dead.

The chiefs said Moller and her family were longtime local residents.

Asked whether Moller fired her weapon, Bracy said he couldn’t say and that was for the Attorney General’s Office to determine. No officers were injured.

The chiefs did not identify the officers involved, saying only that they were both veteran officers. Bracy said the York officer was put on administrative leave with pay, according to the department’s policy. Lajoie said the South Berwick officer was not put on leave.

The chiefs said it was the first officer-involved shooting for either police department in more than 30 years.

By law, the Attorney General’s Office investigates all uses of deadly force by police officers. State police detectives who were at the scene Thursday worked with the Attorney General’s Office to collect evidence and interview witnesses.

There have been 10 officer-involved shootings in Maine this year. Six people have been shot and killed by officers, in Windham, Lagrange, Mexico, Chester, Ludlow and now South Berwick. The other four shootings resulted in injuries.