BRANCHBURG, N.J. — President Trump is considering scrapping or postponing a planned visit to Britain this year amid a billowing backlash over comments he made after the recent terrorist attack in London, two administration officials said.

Over the past week, Mr. Trump has expressed increasing skepticism to aides about the trip after coming under intense criticism for a misleading charge that he leveled against London’s mayor, Sadiq Khan. A day after terrorists killed eight people in the British capital, Mr. Trump went after Mr. Khan on Twitter, saying the mayor had played down the danger to citizens in the wake of the assault.

The White House briefly considered including the visit as part of a trip to Europe next month, but the idea was dropped because of scheduling issues. Then it was tentatively penciled in for the fall. National Security Council and State Department officials were working on the details but had not undertaken the usual “preadvance” trip to work out the specific logistics of joint appearances, said a person familiar with the situation.

Mr. Trump, who was visiting his golf course in Bedminster, N.J., over the weekend, has not definitively ruled out going, the officials said. They emphasized that it was possible that the president would eventually warm to the idea, and that keeping it off the schedule was the best way to prepare for any eventuality.