The United States and Britain have long prized their “special relationship,” but early signs indicate that if Donald J. Trump wins the presidency the bond between the two allies could be weakened.

Prime Minister David Cameron and Sadiq Khan, London’s new mayor, have both spoken out against Mr. Trump’s plan to halt immigration of Muslims into the United States, with Mr. Cameron calling the proposal “stupid and wrong” and Mr. Khan calling Mr. Trump “ignorant” about Islam. In an interview with Britain’s ITV television station that was published on Monday, Mr. Trump hit back against the criticism and warned that it would not be forgotten.

“It looks like we’re not going to have a very good relationship,” Mr. Trump said of Mr. Cameron in the interview with ITV’s Piers Morgan.

He added, “I hope to have a good relationship with him, but it sounds like he’s not willing to address the problem either.”