WASHINGTON, DC - SEPTEMBER 16: US Republican presidential nominee Donald Trump says US President Barack Obama was born in the United States during a campaign event at the Trump International Hotel, September 16, 2016 in Washington, DC. Trump invited former military veterans to speak during the event.   (Photo by Mark Wilson/Getty Images)
Mark Wilson/Getty Images
WASHINGTON, DC - SEPTEMBER 16: US Republican presidential nominee Donald Trump says US President Barack Obama was born in the United States during a campaign event at the Trump International Hotel, September 16, 2016 in Washington, DC. Trump invited former military veterans to speak during the event. (Photo by Mark Wilson/Getty Images)
Now playing
01:01
Trump: Take guns from Clinton security, see what happens
Green Party presidential nominee Jill Stein waits to be introduced prior to a press conference at the National Press Club August 23, 2016 in Washington, DC.
Win McNamee/Getty Images
Green Party presidential nominee Jill Stein waits to be introduced prior to a press conference at the National Press Club August 23, 2016 in Washington, DC.
Now playing
01:44
Jill Stein raises millions for recount
Former Democratic US Presidential candidate Hillary Clinton speaks to staff and supporters at the New Yorker hotel after her defeat in the presidential election November 9, 2016 in New York. / AFP / Brendan Smialowski        (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)
BRENDAN SMIALOWSKI/AFP/Getty Images
Former Democratic US Presidential candidate Hillary Clinton speaks to staff and supporters at the New Yorker hotel after her defeat in the presidential election November 9, 2016 in New York. / AFP / Brendan Smialowski (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)
Now playing
02:14
Scientists urge Clinton to call for recount
LYNDEN, WA - MAY 07: Republican presidential candidate Donald Trump gives a speech during a rally at the The Northwest Washington Fair and Event Center on May 7, 2016 in Lynden, Washington. Trump became the Republican presumptive nominee following his landslide win in Indiana on Tuesday. (Photo by Matt Mills McKnight/Getty Images)
Matt Mills McKnight/Getty Images North America/Getty Images
LYNDEN, WA - MAY 07: Republican presidential candidate Donald Trump gives a speech during a rally at the The Northwest Washington Fair and Event Center on May 7, 2016 in Lynden, Washington. Trump became the Republican presumptive nominee following his landslide win in Indiana on Tuesday. (Photo by Matt Mills McKnight/Getty Images)
Now playing
03:25
Donald Trump's wild ride
Now playing
01:46
Trump's challenges in the Middle East
donald trump undocumented immigrants crime fact check origwx ty_00013807.jpg
donald trump undocumented immigrants crime fact check origwx ty_00013807.jpg
Now playing
02:47
Fact checking Trump on crimes by immigrants
Mark Makela/Getty Images/Lintao Zhang/Getty Images
Now playing
01:26
Trump vs. the tape on Obama and the protester
Now playing
01:28
Trump compares Clinton email probe to Watergate
Members of the Secret Service rush Republican presidential candidate Donald Trump off the stage at a campaign rally in Reno, Nev., on Saturday, Nov. 5, 2016. (AP Photo/John Locher)
John Locher/AP
Members of the Secret Service rush Republican presidential candidate Donald Trump off the stage at a campaign rally in Reno, Nev., on Saturday, Nov. 5, 2016. (AP Photo/John Locher)
Now playing
01:20
Donald Trump rushed off stage by Secret Service
AFP/Getty Images
Now playing
02:16
Trump reads letter from Patriot's coach at rally
US Republican presidential nominee Donald Trump speaks during rally at the Atkinson Country Club in Atkinson, New Hampshire on November 4, 2016.
Mandel Ngan/AFP/Getty Images
US Republican presidential nominee Donald Trump speaks during rally at the Atkinson Country Club in Atkinson, New Hampshire on November 4, 2016.
Now playing
01:56
Trump on US officials: 'What a group of losers'
donald trump nice and cool pensacola fl bts_00001523.jpg
donald trump nice and cool pensacola fl bts_00001523.jpg
Now playing
00:49
Trump's mantra in campaign's final week: Stay on point
donald trump nice to hillary clinton and democrats orig cm_00000000.jpg
donald trump nice to hillary clinton and democrats orig cm_00000000.jpg
Now playing
01:52
Audio of Trump praising the Clintons and Democrats
cuomo lewandowski hillary clinton email exchange newday_00002327.jpg
cuomo lewandowski hillary clinton email exchange newday_00002327.jpg
Now playing
01:28
Cuomo grills Lewandowski on Clinton email 'hypocrisy'
Now playing
00:10
This video is no longer available
Now playing
01:49
Meet the other Hillary Clinton and Donald Trump

Story highlights

"When it comes to credibility problems, though, Donald Trump is in a league of his own," Gates wrote

He also criticized Hillary Clinton on her handling of foreign policy

Washington CNN —  

Robert Gates criticized both Hillary Clinton and Donald Trump on their preparedness to handle US foreign policy – but the former defense secretary reserved his harshest language for the Republican nominee, who he said is “beyond repair.”

“When it comes to credibility problems, though, Donald Trump is in a league of his own,” Gates, a Republican who led the Defense Department under Presidents George W. Bush and Barack Obama, wrote in a Wall Street Journal op-ed Friday, adding that electing Trump is “too great a risk for America.”

“The world we confront is too perilous and too complex to have as president a man who believes he, and he alone, has all the answers and has no need to listen to anyone,” Gates wrote. “A thin-skinned, temperamental, shoot-from-the-hip and lip, uninformed commander in chief is too great a risk for America.”

Robert Gates: I question Hillary Clinton’s judgment on email server

Gates called Trump too “willfully ignorant about the rest of the world” to be commander in chief. He specifically criticized Trump’s plan to build a wall on the US border with Mexico, his call to torture terrorists and kill their family members, and his praise of Russian President Vladmir Putin.

“At least on national security, I believe Mr. Trump is beyond repair. He is stubbornly uninformed about the world and how to lead our country and government, and temperamentally unsuited to lead our men and women in uniform,” Gates wrote. “He is unqualified and unfit to be commander in chief.”

Despite his harsh criticism of Trump, Gates wrote that he remains an undecided voter.

He criticized Clinton for advocating “ill-fated regime change in Libya” and her shifting positions on the Iraq War and US trade agreements.

“Mrs. Clinton has ruled out putting U.S. ground troops in Iraq and Syria ‘ever again,’” he wrote. “That is a politically driven categorical declaration of a sort no president (or candidate) should make, and it raises the question whether she would pull out the 5,000 U.S. troops now in Iraq. She has expressed no new ideas to deal with the boiling caldron that is today’s Middle East.”

But, he wrote, Clinton can still earn his vote.

“Mrs. Clinton has time before the election to address forthrightly her trustworthiness, to reassure people about her judgment, to demonstrate her willingness to stake out one or more positions on national security at odds with her party’s conventional wisdom, and to speak beyond generalities about how she would deal with China, Russia, North Korea, Iran, the Middle East – and international trade,” he wrote. “Whether and how she addresses these issues will, I believe, affect how many people vote – including me.”

Republicans use Gates’ new book to hammer Clinton, Biden

Gates, who worked for eight presidents for more than 50 years, said the best commanders in chief hire advisers who aren’t afraid to contradict their boss.

“All of the presidents I served were strong personalities with strongly held views about the world,” he said. “But each surrounded himself with independent-minded, knowledgeable and experienced advisers who would tell the president what he needed to hear, not what he wanted to hear.

“Sometimes presidents would take their advice, sometimes not. But they always listened,” Gates wrote.