SPRINGFIELD — A veteran officer of the Springfield Police Department was shot to death Monday after­noon while responding to a call about a domestic dispute ­between a woman and her former boyfriend, police said.

The man, a correctional officer from New York, then shot his former girlfriend and took his own life, police said. The woman ­remained in critical condition Monday night.

Officer Kevin Ambrose, 56, a ­father of two who had served on the force for 38 years, was the first officer in Western Massachusetts to die in the line of duty since 1999, according to police.

Springfield Police photo

Officer Kevin Ambrose, 56.

“We grieve this remarkable officer,” said Springfield Mayor Domenic J. Sarno at a press conference Monday afternoon. “The whole city mourns the loss of Officer Ambrose. This shows the perils that our men and women in blue face each and every day. . . . He wore his badge with integrity and honor.”

“Domestic violence, as you can see, unfortunately is a very dangerous call,” Sarno added.

A state trooper parked ­outside Ambrose’s home in ­Wilbraham said relatives were not available to comment.

Less than an hour before the shooting, a judge in Springfield District Court ordered Shawn Bryan, 35, a correction officer from Hempstead, N.Y., who works at Rikers Island in New York City, to stay away from Charlene Mitchell, 29, and their 1-year-old daughter, according to police and court records.

Shortly before 1 p.m., ­Ambrose met Bryan and ­Mitchell outside her apartment building on Lawton Street in the Sixteen Acres neighborhood of Springfield, police said.

They had a brief conversation, and the officer escorted the two back to her third-floor apartment so Bryan could collect some of his possessions, as ­allowed by the court, police said. Ambrose was alone, awaiting other officers that had been dispatched to the scene, police said.

When the three arrived at the door to her apartment, ­Bryan allegedly shoved Mitchell inside and shut it behind them, locking out Ambrose, Police Commissioner William J. ­Fitchet said at the press conference.

“Ambrose attempted to get inside the apartment door by shoving the door and pushing to gain entrance,” police said in a press release.

As Ambrose struggled to open the door, Bryan allegedly took out a handgun and shot him through it, Fitchet said. After­ward, police said, he stepped into the hallway and shot ­Ambrose again.

Police said Bryan then went back into the apartment and shot Mitchell, who was at ­Baystate Medical Center in Springfield Monday night.

Fitchet said Bryan then walked to his car and shot himself in the chest. Officers found a handgun in his car, Fitchet said.

In her request for a restraining order, Mitchell said she feared “imminent physical harm” from Bryan, that he was at her home Monday morning and she believed he was armed, according to The Republican of Springfield, which posted a copy of the application on its website.

In a sworn statement on the application, Mitchell said ­Bryan had been “physical with me.”

“He has always told me that he is crazy and his head is not good,” she wrote. “I have had problems with him from the day we started to date.”

She said she wanted him to have a relationship with their daughter, even after they broke up last July, but the two continued to experience conflict.

He told her he wanted his TV back, and he was supposed to pick it up Sunday morning.

Mitchell said she asked ­Bryan to make arrangements to do that with her sister, but he started texting and calling her. After multiple calls, she wrote, she finally picked up the phone and the two began to argue.

Mitchell hung up and said Bryan texted her: “I’m going to make you wish you were not born.”

She said he told her that “he is the man, and he make[s] people get on their knees.”

New York City Department of Correction Commissioner Dora Schriro said Bryan had worked as a correctional officer at the Anna M. Kross Center on Rikers Island since August 2009. He had worked Saturday and was scheduled to work Tuesday.

“We are shocked and saddened by today’s events,” Schriro said in a statement. “Each of us takes an oath of office to preserve and protect the lives of others. This is an unspeakable tragedy. We express our heartfelt condolences.”

Outside the apartment building in Springfield, a neighbor of Mitchell’s, Lisa Granger, said her son heard the shots. She did not know Mitchell, she said, and described the complex as generally quiet.

“I’m just really sad that a ­police officer didn’t make it,” Granger said.

Inside the building, blood stained the walls and a pool of blood remained outside Mitchell’s apartment.

Desiree Romero, 44, who lives on the ground floor, said she heard multiple shots before Mitchell’s aunt knocked on her door in tears.

“She was saying, ‘The cop got shot,’ ” Romero said.

She said she saw police carrying Mitchell’s daughter down the stairs, and the child had blood all over her face.

David Abel can be reached at dabel@globe.com. Follow him on Twitter @davabel. Travis Andersen can be reached at tandersen@globe.com. Follow him on Twitter @TAGlobe.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.