Former Utah Rep. Jason Chaffetz blasted "pathetic and inept" Congress for not working to halt illegal immigration until President Trump's decision to declare a national emergency at the southern border.

As Fox News reported, Trump made the announcement on Friday, just hours ahead of the midnight deadline to avoid another partial government shutdown.

"We’re going to confront the national security crisis on our southern border. … One way or the other, we have to do it," Trump said.

Chaffetz, a Fox News contributor, said on Fox & Friends that over the last few years Congress has prioritized not shutting down the government over shutting down illegal immigration.

Sarah Sanders: 'Very Big Difference' Between Obama & Trump's Executive Actions

"Shame on the Democrats for not protecting this nation," he added. "But Republicans are complicit too. ... They absolutely blew this. There was a better, smarter way to do this."

Chaffetz said that the border-spending bill that Trump signed puts "handcuffs" on him.

The bill provides around $1.4 billion for new barriers along the U.S.-Mexico border and can fund 55 miles of barricades.

"The president can only sign what shows up on his desk. So, I totally understand and support what the president does, is doing, but I think he feels like he's out there all alone," Chaffetz said. "Where are the rest of the people that are supporting him to build this wall?"

Watch more above.

Homan on Nat'l Emergency: Dems Had Trump 'in a Corner' Over Border Security Decision

Varney on Amazon Skipping NYC: 'Dems Now Learning the Downside of Ocasio-Cortez'

NY Assemblywoman Rips AOC for Cheering Amazon Withdrawal: 'No Idea How the Economy Works'