President Donald Trump is being ridiculed for floating a deal with Russian President Vladimir Putin in which their two nations would cooperate in improving cyber security.

Referring to his nearly two-and-a-half-hour meeting with Putin in Hamburg, Germany Friday, Trump wrote on Twitter Sunday that he and Putin had "discussed forming an impenetrable Cyber Security unit so that election hacking, & many other negative things, will be guarded and safe."

Several hours later, faced with growing opposition at home, Trump seemed to back off. "The fact that President Putin and I discussed a Cyber Security unit doesn't mean I think it can happen. It can't--but a ceasefire can, & did!" These last few words apparently referred to a Trump-Putin agreement, negotiated at their meeting, to arrange a cease-fire in part of Syria.

But Trump critics, and even fellow Republicans, were unsettled by his initial comments about working in partnership with Moscow, a traditional adversary of the United States, on cyber security. The critics expressed fear that this would give Moscow access to more techniques and secret information than they already have, and Russian operatives could use these against the United States and its allies as they allegedly did by meddling in the 2016 presidential election through hacking and other forms of cyber warfare. There also was fear that Russia could expand their attempted cyber warfare to power plants and government email systems.

"It's not the dumbest idea I've ever heard, but it's pretty close," Sen. Lindsey Graham, R-S.C., told NBC. "There's only one person in Washington, that I know of, that has any doubt about what Russia did in our election, and it's President Trump."

"It's strategic idiocy," Chris Finan, a former cyber security adviser to President Barack Obama, told Politico.