The King has written privately to Donald Trump after the former US president survived an assassination attempt, Buckingham Palace said.

It is understood Charles’s message was in keeping with Prime Minister Sir Keir Starmer’s conversation with Mr Trump, in which he condemned the violence, expressed his condolences for the victims and their families, and wished the former president and those injured a quick recovery.

The King’s message was delivered on Sunday via the UK embassy in Washington DC.

The then-Prince of Wales, Queen Elizabeth II, then-US president Donald Trump and Melania Trump
Charles condemned the violence which left Mr Trump injured at a political rally (Andrew Matthews/PA)

Buckingham Palace said the contents of the correspondence would be kept private.

In 2019, Charles, the-then Prince of Wales, hosted Mr Trump and his wife Melania for afternoon tea at Clarence House with the then-Duchess of Cornwall during a Nato summit in London.

Mr Trump was also feted with a state banquet, hosted by the late Queen, during a state visit to the UK earlier the same year.

President Trump and the late Queen smile at one another as they sit at the state banquet table side by side
The then-US president Donald Trump and Queen Elizabeth II during the State Banquet at Buckingham Palace in 2019 (Dominic Lipinski/PA)

The Republican presidential candidate, who was targeted by a gunman at a campaign rally in Butler, Pennsylvania on Saturday, said he wants to “bring the country together” in the wake of the attack.

He told The Washington Examiner, before an address to the Republican National Convention, if he had not turned his head away from the crowd to look at a screen showing data he was using in his speech, “we would not be talking today”.

Mr Trump said on his Truth Social media platform that a bullet had “pierced” his ear before he was dragged to the ground by Secret Service agents.

Donald Trump's ear bleeds after the gun attack
Republican presidential candidate former president Donald Trump is escorted to a motorcade following an attempted assassination at a campaign event (Gene J. Puskar/AP)

One person at the rally was killed – former fire chief Corey Comperatore – and two other spectators were critically injured, authorities said.

The gunman, 20-year-old nursing home employee and registered Republican Thomas Matthew Crooks, was shot dead by the Secret Service.

It was the most serious attempt to assassinate a US president or presidential candidate since Ronald Reagan was shot in 1981.