(Reuters) - A former top CIA official attacked Donald Trump on Friday as a danger to national security, saying President Vladimir Putin had made the Republican presidential candidate an “unwitting agent” of Russia.

Russian President Vladimir Putin attends a media forum of the All-Russia People's Front in St. Petersburg, Russia, April 7, 2016. REUTERS/Dmitry Lovetsky/Pool

Putin had flattered Trump into supporting positions favorable to Russia, Michael Morell, a longtime CIA officer and former deputy director of the agency, said in an opinion piece in The New York Times.

“In the intelligence business, we would say that Mr. Putin had recruited Mr. Trump as an unwitting agent of the Russian Federation,” Morell said, in an article in which he endorsed Trump’s rival in the Nov. 8 election, Democrat Hillary Clinton.

Morell did not provide evidence for his assertion, but he said Putin had used skills from his past as an intelligence officer to identify and exploit vulnerabilities in an individual.

“That is exactly what he did early in the primaries. Mr. Putin played upon Mr. Trump’s vulnerabilities by complimenting him. He responded just as Mr. Putin had calculated,” Morell wrote.

Trump’s campaign dismissed Morell’s criticism, linking the ex-CIA officer to the Obama administration’s public response after the September 2012 attacks in Benghazi, Libya.

“Count how many reporters will tweet today that Michael Morell lied for #CrookedHillary to cover up Benghazi,” Trump’s campaign said in a Twitter message.

The incident, in which the U.S. ambassador and three other Americans were killed, occurred while Clinton was secretary of state, and Republicans have long criticized her handling of the attack and its aftermath.

Critics say administration officials tried to play down the role of Islamist militants in the attacks. Morell approved talking points after the incident. U.S. officials have said any reference to militants taking part was initially dropped for classification reasons.

Morell is currently affiliated with Beacon Global Strategies, a consulting firm with ties to senior Democrats with national security expertise, including former defense secretary and CIA director Leon Panetta and former top Clinton aide Philippe Reines.

Trump’s vice presidential running mate, Indiana Governor Mike Pence, on Friday dismissed Morell’s comments, saying that “standing up to Russian aggression is going to be really different under a Trump-Pence administration.”

“These people are playing politics,” Pence said of Morell in an interview on NBC’s “Today” program.

Morell’s article, in which he also said Trump had undermined U.S. security with his campaign proposal to combat terrorism by imposing a temporary ban on Muslims entering the country, added to questions raised by some national security experts about the New York businessman’s qualifications to be president.

On Thursday, a bipartisan group of experts criticized Trump’s lukewarm support for the NATO alliance, comments about Russia’s annexation of Crimea and other matters as “disgraceful.”

Trump has also drawn criticism for his praise for Putin as a strong leader, particularly after Moscow came under suspicion from U.S. officials as being behind recent hacking of Democratic Party groups. Moscow has denied the allegations.