Former FBI Director James Comey testifies before a Senate Select Intelligence Committee hearing on Russian interference in the 2016 election on June 8, 2017.

Former FBI Director James Comey said President Donald Trump's move to separate migrant children from their parents could be the biggest mistake of his presidency.

Under huge pressure from Democrats and Republicans alike, Trump hastily reversed the policy Wednesday.

"Every so often, the giant is awakened that offends no matter where you are. There's good to come out of it (migration policy), it may be stirring the giant," Comey told a London audience on Thursday. "That's why Trump ran so fast and lied so much. One thing he is good at is sensing the giants awakening."

The White House did not immediately respond to a CNBC request for comment about Comey's remarks. It released a statement on Wednesday blaming congressional inaction for the separations, saying that it is "the policy of this administration to maintain family unity, including by detaining alien families together where appropriate and consistent with law and available resources."