Newt Gingrich said Democrats are using the controversy over migrant family separations at the border to play politics.

President Donald Trump on Wednesday signed an executive order to allow children to stay with parents caught crossing the border illegally -- moving to stop the family separations that have triggered a national outcry and political crisis for Republicans.

In response, many Democrats -- including House Minority Leader Nancy Pelosi (D-Calif.), Sen. Bernie Sanders (I-Vt.) and Sen. Chuck Schumer (D-N.Y.) -- slammed the order, which they claim allows illegal immigrants to be detained indefinitely.

"The very Democrats who wanted him to act came back immediately and didn't like the fact that he acted," Gingrich said on "Fox & Friends."

Hume: Trump 'Will Be Seen as Acting to End' Child Separations of Migrants

'She's Finished': Farage Says Merkel Ruined Career With 'Open Door' Migrant Policies

He argued that Trump has struck the right balance of trying to keep families together while also controlling the U.S.-Mexico border.

"The Democrats want to use the children as an excuse to go to an open border where tens of millions of people could flood into the U.S.," Gingrich said.

He noted that the Obama administration also had a "zero tolerance policy" on illegal immigration, but there was no uproar from Democrats.

"There's a certain amount of really remarkable hypocrisy on the left right now, and no indication by the way that Chuck Schumer, for example, the Democratic leader, has any interest in fixing the law to help these children," Gingrich said.

He suggested that this "brutal partisanship" could end up costing Democrats six to eight seats in the Senate in November's midterm elections.

Trump Says Country Will Be 'Overrun' if He's Weak on Immigration

'The Five' Reacts to Peter Fonda's Obscene Remark about Barron Trump

Goldberg: White House Messaging on Migrant Family Separations 'Has Been a Disaster'