President Donald Trump suggested he could force a prolonged government shutdown Wednesday as the partial closure dragged into its fifth day.

Funding for nine federal departments lapsed Saturday amid an impasse over whether to fund the president's proposed border wall. As congressional leaders and the White House appear to make little progress toward a deal, the shutdown could last past Jan. 3, when Democrats take control of the House.

Asked Wednesday during a surprise visit to U.S. troops in Iraq how long he would wait to see his demands met, Trump responded: "Whatever it takes." The comment suggests little willingness on the president's part to back down as Democrats refuse to approve funds for the proposed barrier.

"Nancy is calling the shots," Trump added, referencing House Minority Leader Nancy Pelosi, a California Democrat and the likely next House speaker. The president has recently tried to blame Democrats for the closure, even though he said earlier this month that he would be "proud to shut down the government for border security."

Democrats have pledged to quickly pass a short-term spending bill without wall money when they take control of the House. Before the shutdown started, the Senate approved legislation to fund the government through Feb. 8 without funding for the barrier.

But after Trump threatened to veto the proposal, it crumbled in the GOP-controlled House. The chamber passed the president's desired $5 billion for the wall. Democrats refused to approve that bill in the Senate, where the GOP has a 51-49 majority and needs 60 votes.