President Donald Trump made the statement that the United States is withdrawing from the Paris Climate Accord, in the Rose Garden of the White House, June 1, 2017.

President Donald Trump tweeted his condolences to the family of Sen. John McCain, who died Saturday at age 81, after years of bad blood between the two Republicans.

"My deepest sympathies and respect go out to the family of Senator John McCain. Our hearts and prayers are with you!" the president tweeted.

TRUMP TWEET

Trump's tweet came after more than a day of silence from him and the White House following the McCain family's revelation that the maverick Republican senator had decided to cease medical treatment as he fought brain cancer.

Trump has frequently criticized McCain since he first launched his presidential campaign in 2015, and kept up the abuse even as McCain battled cancer. The pair butted heads more often than the president did with other members of his party. McCain habitually spoke out when he thought the president violated American democratic or national security norms.

Some of Trump's most explosive remarks in his campaign came early on in July 2015, when he mocked the senator's time as a tortured prisoner of war in Vietnam.

"He was a war hero because he was captured. I like people who weren't captured," Trump said of McCain, prompting widespread backlash.

The president's public jabs at his fellow Republican only became more frequent after McCain — who had just returned to Washington following his brain cancer diagnosis — turned his thumb down on the Senate floor last year to help sink his party's effort to repeal the Affordable Care Act. In numerous public appearances since, Trump has criticized McCain for his vote, often without naming him.

"Except for one senator, who came into a room at 3 o'clock in the morning and went like that, we would have had health care too, we would have had health care too, think of that," Trump said in February while mimicking McCain's thumbs down gesture.

Even as McCain was out of Washington receiving treatment this year, his office kept pressure on Trump. For instance, when the president suggested Russia should rejoin the G7 group of world powers, the senator rebutted him in a June statement.

As he often did during Trump's presidency, McCain contended that the president's actions could harm U.S. allies and undercut America's standing in the world.

"The President has inexplicably shown our adversaries the deference and esteem that should be reserved for our closest allies," McCain said. "Those nations that share our values and have sacrificed alongside us for decades are being treated with contempt. This is the antithesis of so-called 'principled realism' and a sure path to diminishing America's leadership in the world."