WASHINGTON (Reuters) - U.S. Senator John McCain rebukes President Donald Trump in a new memoir, accusing his fellow Republican of failing to uphold U.S. values by showering praise on international “tyrants,” discrediting the media, ignoring human rights and demeaning refugees.

FILE PHOTO - Senator John McCain (R-AZ) speaks at a press conference about the National Defense Authorization Act in Washington, U.S., October 25, 2017. REUTERS/Aaron P. Bernstein/File Photo

“Flattery secures his friendship, criticism his enmity,” wrote McCain in “The Restless Wave,” which he co-authored with longtime aide Mark Salter.

“It is hard to know what to expect from President Trump, what’s a pose, what’s legitimate,” McCain said in the book that is due to be released on May 22. An advance copy was sent to Reuters by publisher Simon & Schuster.

McCain, the 2008 Republican presidential nominee, remains one of the strongest voices in his party on foreign policy, despite a battle with brain cancer. He has been credited with championing civility and compromise in Congress during an era of acrid partisanship in U.S. politics.

The 81-year-old Arizona lawmaker, who has served in the Senate since 1987, has also been both a critic and target of Trump, who during his 2016 presidential campaign disparaged McCain’s war record by saying he was not a hero after enduring 5-1/2 years as a prisoner of war in North Vietnam.

In his memoir, McCain said Trump had appeared to mock the idea the United States should promote its values abroad and slammed him for threatening to kill the spouses and children of terrorists during his campaign.

“His lack of empathy for refugees, innocent, persecuted, desperate men, women and children is disturbing. The way he speaks about them is appalling,” said McCain, who still chairs the Senate Armed Services Committee despite his long medical absence from Washington.

At the same time, McCain noted Trump’s praise of Russian President Vladimir Putin and said he “seems just as smitten” with Chinese President Xi Jinping, leaders whom McCain accused of repression.

“He has showered with praise some of the world’s worst tyrants,” McCain added.

He also accused Trump of failing to raise U.S. concerns about human rights.

“The world expects us to be concerned with the condition of humanity. We should be proud of that reputation,” McCain said. “I’m not sure the President understands that.”

Trump’s branding of unflattering news stories as fake news - regardless of their validity - was a technique “copied by autocrats who want to discredit and control a free press,” McCain said.

The White House did not immediately offer any comment on McCain’s accusations.

POLITE REBUFF

McCain was the central figure in one of the most dramatic moments in Congress of Trump’s presidency when he returned to Washington in July 2017, shortly after his brain cancer diagnosis, for a crucial middle-of-the-night vote.

Still bearing a black eye and scar from surgery, McCain gave a thumbs-down signal in a decisive vote to scuttle a Trump-backed bill to repeal the Obamacare healthcare law.

In the book, McCain recalled how Trump called him shortly before he cast his vote.

“I listened quietly as he asked me to reconsider. I don’t remember exactly how I responded, but it was a polite rebuff,” McCain wrote.

McCain mocked Steve Bannon and Sebastian Gorka - whom he called some of Trump’s “weirder” advisers - saying he was relieved they had left the administration.

“Bigger misfits haven’t been seen inside a White House since William Taft got stuck in his bathtub,” McCain wrote, referring to early 20th-century President William Howard Taft.

McCain concluded his memoir by citing Robert Jordan, the main character in Ernest Hemingway’s “For Whom the Bell Tolls,” who said as his death approached: “The world is a fine place and worth fighting for and I hate very much to leave it.”

“And I do too,” McCain wrote. “But I don’t have a complaint. Not one. It’s been quite a ride.”