On the seventh day of a government shutdown, President Donald Trump said Friday that if Democrats don't vote to fund his wall he will order the closure of the border with Mexico — a highly dramatic move that would cost the US billions of dollars in trade and potentially worsen the ongoing humanitarian crisis there.

"We will be forced to close the Southern Border entirely if the Obstructionist Democrats do not give us the money to finish the Wall & also change the ridiculous immigration laws that our Country is saddled with," he wrote in a series of tweets.

Trump's threat is the latest in a series of conflicting positions about how he'll fund his proposed wall and who is responsible for the government shutdown, which will continue at least until Congress returns on Jan. 2.

It's also not the first time Trump has warned he may close the border. He threatened to do so in October before the midterm elections to prevent the so-called caravan of Central American migrants from reaching the US.

But it is the first time the president has used the ultimatum as a negotiation tactic with Democrats, who oppose his bid to use US taxpayer dollars to fund the wall he vowed repeatedly Mexico would pay for.

"Either we build (finish) the Wall or we close the Border," he wrote.

Paul Ratje / AFP / Getty Images

The border fence near New Mexico's Highway 9, near Santa Teresa on Dec. 23, 2018.

Republicans still control both houses of Congress but require Democratic support in the Senate to overcome the 60-vote filibuster requirement. Democrats will take over the House of Representatives on Jan. 3, when Rep. Nancy Pelosi becomes Speaker.

The president does have the legal authority to close US ports of entry or order heightened inspections that would lead to lengthy delays. President George W. Bush ordered the extra security measures after 9/11, leading to a partial border closure, according to USA Today, while President Ronald Reagan shut the border in 1985 in response to the death of a DEA agent in Mexico.

But closing the border might worsen an existing humanitarian crisis, with thousands of Central Americans already waiting in squalid conditions in Tijuana as they await processing of their asylum claims at the US port of entry.

Any move to do so would also have enormous effects on US trade, crippling companies that import from and export to Mexico, the third largest US trading partner. Some $1.7 billion of two-way trade occurs every day with Mexico in addition to hundreds of thousands of legal border crossings, according to the State Department. Quartz found that in July some $42 billion worth of goods crossed the border, with Texas, California, and Michigan being the states that saw the most trade with Mexico.

"Closing the US-Mexico border would wreck the Texas economy," Rep. Joaquin Castro, Democrat of Texas, said on Twitter.

In his tweets on Friday, Trump said he wasn't concerned about trade being harmed, citing a protectionist claim that closing the border would return the country to the days before the North American Free Trade Agreement and bring the car industry back to the US. "I would consider closing the Southern Border a 'profit making operation,'" he wrote. But in addition to ignoring the short-term effects of closing the border, Trump's claim does not consider the economic impact on US exporters.

Trump previously said that he will take responsibility for the government shutdown if the wall does not get funded. Then he changed his tune once it happened, blaming Democrats.

Asked on Fox News whether the president was serious about closing the border, acting chief of staff Mick Mulvaney said, "I think he is."

"That is why the government is closed," Mulvaney added, "because the president is not willing to give up on the southern barrier."

Andrew Caballero-Reynolds / AFP / Getty Images

The White House amid the ongoing government shutdown on Thursday.

Democrats, however, continued to blame the president for the ongoing partial government shutdown.

"Republicans still control the House, Senate and White House yet a partial government shutdown goes on," Rep. Debbie Wasserman Schultz of Florida tweeted Friday. "So Coast Guard members and hundreds of thousands of other families face going without pay. All over a border wall boondoggle Trump promised Mexico would pay for."

When Democrats take control of the House of Representatives, they are likely to immediately pass a bill to reopen the government that includes no funding for the wall but with money allocated for border security more generally.

“Democrats have offered Republicans three options to reopen government that all include funding for strong, sensible, and effective border security – but not the President's immoral, ineffective and expensive wall," Drew Hammill, Pelosi's deputy chief of staff said. "Democrats will act swiftly to end the Trump Shutdown, and will fight for a strategic, robust national security policy, including strong and smart border security, and strong support for our servicemembers and veterans.”

In addition to his tweets on the border on Friday, Trump also said he would be ending foreign aid to three Central American nations — Honduras, Guatemala, and El Salvador — who he said "are doing nothing for the US but taking our money."

"Word is that a new Caravan is forming in Honduras and they are doing nothing about it," he wrote. "We will be cutting off all aid to these 3 countries - taking advantage of U.S. for years!"

The US sent a combined $181 million in foreign aid to Honduras in 2017 with most of the money being used to support building government and on programs to counter drugs — money that advocates say prevents people from seeking to emigrate in the first place.