WASHINGTON — President Trump falsely asserted on Monday that his predecessor, Barack Obama, and other presidents did not contact the families of American troops killed in duty, drawing a swift, angry rebuke from several of Mr. Obama’s former aides.

Mr. Trump was responding to a question about why he had not spoken publicly about the killing of four Green Berets in an ambush in Niger two weeks ago when he made the assertion. Rather than answering the question, Mr. Trump said he had written personal letters to their families and planned to call them in the coming week. Then he pivoted to his predecessors.

“If you look at President Obama and other presidents, most of them didn’t make calls,” Mr. Trump said during a news conference in the Rose Garden with the Senate majority leader, Mitch McConnell. “A lot of them didn’t make calls. I like to call when it’s appropriate.”

Mr. Trump’s assertion belied a long record of meetings Mr. Obama held with the families of killed service people, as well as calls and letters, dating to the earliest days of his presidency. Before he decided to deploy 30,000 troops to Afghanistan, Mr. Obama traveled to Dover Air Force Base in Delaware to greet the coffins of troops.