WASHINGTON — The loss of three more police officers in Baton Rouge over the weekend demonstrates the importance of the federal government doing everything it can to help police officers go home at night and be safe, President Obama said Tuesday after meeting with key leaders of his domestic security team.

Obama said there is great interest among police departments nationwide in receiving additional training to deal with active-shooter events and to decrease tensions before violence occurs, but that more resources will be necessary. He said many police departments could also use more help purchasing bullet-proof vests. He did not discuss specific amounts that he would like to see Congress make available.

Obama met with Attorney General Loretta Lynch, FBI Director James Comey and Homeland Security Secretary Jeh Johnson in the Oval Office. He addressed reporters for about five minutes after the meeting without taking questions. He said the federal government has many of the tools necessary to help local departments, but the effort to improve policing will also have to be driven within those departments.

“Unfortunately, not all the departments that want to train their officers have the resources to do it,” Obama said.

Obama said his intention over his remaining months in office is to continue to look at best practices and listen to departments and build up trust with local communities. He said there is no contradiction between making sure police have all the tools they need to do their job safely and in building trust between police and the communities they serve.

“This is not something that we’re going to be able to do solely from this office,” Obama said. “… This is something that is going to have to be bottom up and not just top down.”

Earlier Tuesday, the White House released an open letter Obama penned to police departments. He said the nation will get through the recent killings of police officers with the “love and empathy of public servants” like the ones who were targeted in recent days. Obama has said nothing justifies attacks on law enforcement, a sentiment he reiterated in the two-page letter. The Fraternal Order of Police posted the letter on its social media sites.

Obama wrote the letter as he remains under intense criticism from some police officials and others who accuse him of fostering a climate that has led to the intentional killing of law enforcement officers.