PORTSMOUTH, N.H. -- Donald Trump said Thursday that as president he would issue an executive order containing the "strong, strong statement" that he wants the death penalty for those found guilty of killing a police officer.

"One of the first things I'd do in terms of executive orders, if I win, will be to sign a strong, strong statement that will go out to the country, out to the world, that anybody killing a policeman, a policewoman, a police officer, anybody killing a police officer: Death penalty is going to happen, okay?" Trump told members of the New England Police Benevolent Association in a hotel ballroom on Thursday evening. Applause broke out, drowning out the Republican frontrunner.

The idea came from the New England Police Benevolent Association, a police union with members from New Hampshire and Massachusetts that met with the Republican frontrunner on Thursday evening and then endorsed him. During a private meeting with union leaders, Trump answered questions and agreed to push for the death penalty and to find more funding for training, according to several people at the meeting.

Trump provided no details of how such an executive order would work or its legality, especially with a growing number of states discontinuing use of the death penalty and with the federal government's limited jurisdiction. His campaign manager and spokeswoman did not respond to a request for such details.

As Republican candidates have delicately tried to stake a position in the roiling debate over alleged brutality between police officers and minorities, Trump has firmly planted himself on the side of police. Trump has said in previous speeches that while every profession has its "bad apples," police officers have been unfairly criticized at a time when they need to be supported. Trump often responds to questions about the Black Lives Matter movement by saying that "all lives matter" and accusing President Obama of stirring up racial unrest.

This police union is the same one that in September urged police officers to boycott a Labor Day breakfast attended by President Obama and union leaders in Boston. At the time, the union head accused Obama of not being supportive enough of police officers.

"The police and the law enforcement in this country -- I will never ever let them down, just remember that," Trump said on Thursday. "They've had a hard time. These forces throughout the country have had a hard time: A lot of people killed, a lot of people killed really violently."

It was a message that resonated with many officers, including Sgt. Deborah Batista of Middleborough, Mass., who is vice president of the union.

"He seems to be a supporter of law enforcement which is something that we have not seen from the current administration," said Batista, 53. "We are not popular of late, law enforcement."

During comments that lasted fewer than 10 minutes, Trump said police have the most difficult job and should be given "the finest equipment and the finest training." He also warned against political correctness, saying that it is getting in the way of protecting the country. He pointed to the recent mass shooting in San Bernardino as an example of several people failing to notify the police of suspicious behavior.

"They saw bombs sitting on the floor. They had one guy who bought the guns. They had another person that said, 'Oh, I didn't want to report them because I didn't want to go racial profiling,'" Trump said. "Oh, okay -- sees pipe bombs sitting all over the place, didn't want to racially profile. I mean, how stupid do they think we are?"

Outside the endorsement event, which was closed to the public, a couple hundred protesters gathered with signs denouncing a number of Trump's controversial stances, including his proposal Monday to bar most Muslims from entering the country. A band played and activists sang. They filled both sides of the street near the hotel, anchored around a long lit-up sign that stated "Love > hate." There was also a banner that read: "Shame on the police union!!!" And a sign that said: "NH police endorse racism."

"The things he has been spewing out... It's time to just stand up," said Joan Jacobs, 71, a former federal employee who retired to Portsmouth and held a sign that said: "We welcome refugees."

"We're standing up to hate," said her husband, Larry Drake, 64, whose sign read: "No scapegoating Muslims."

"And fear," Jacobs added. "That's the way authoritarian leaders get their power, by scapegoating."

Inside the hotel, a small group of union members got into a heated argument in the lobby after the event as a few reporters worked nearby. Part of the reason Trump was endorsed was because he was the only presidential candidate who agreed to meet with them, and at least one union member passionately suggested that wasn't enough. Several other officers declined to comment on the endorsement.

Jerry Flynn, the union's executive director, briefly answered questions from reporters, a few of whom asked about Trump's controversial stances. One reporter asked if making the endorsement this week would reflect badly on law enforcement.

"How much more can law enforcement be reflected badly on?" Flynn said. "Every time we open up the news, people are taking potshots at us -- whether it's literally or figuratively. So, Donald Trump is a breath of fresh air, as far as I'm concerned."

As Flynn tried to cut off the questions, clearly irritated, another reporter asked him about the protesters outside with the sign declaring "shame on the police."

"Those are the same people who stood out in the middle of 93, laying down on the sidewalk, saying, 'Black lives matter,'" Flynn said, referencing a group of activists who blocked traffic on Interstate 93 into Boston in January, snarling rush hour traffic. "Well, you know what? Police lives -- all lives matter, as far as we're concerned. And I'm telling you right now that we endorsed a candidate who best serves our membership."