President Trump said that he would “totally be willing” to shut down the government if Congress doesn't agree to his demand for $5 billion to build a border wall.

"People look at the border, they look at the rush to the police, they look at the rock throwers and really hurting three people, three very brave border patrol folks," Trump told Politico in a Tuesday night Oval Office interview. "I think that it's a tremendous issue, but much more importantly, is really needed. So we have to have border security."

"I am firm" on the demand for border funding, Trump added.

[Read more: Senate GOP scrambling to find $5B for Trump's border wall]

Senate lawmakers agreed earlier this year that they would want to pass $1.6 billion in border wall funding, which Senate Minority Leader Chuck Schumer stuck to on Tuesday.

“The $1.6 billion in border security agreed to by Democrats and Republicans is our position. We believe that is the right way to go,” Sen. Schumer, D-N.Y., said. “We are not negotiating in the press. This is our position.”

Over the weekend, migrants rushed the border , many throwing rocks at U.S. Border Patrol officers, causing a temporary shutdown of the port of entry between Tijuana and San Diego.

Congress has until Dec. 7 to agree on funding for the Department of Homeland Security for the rest of fiscal year 2019, a bill that Republicans are hoping can include Trump's border funding.