Washington • President Donald Trump on Friday threatened a years-long shutdown of the federal government to get the money he wants for his U.S.-Mexico border wall, even as he asserted that he could declare a national emergency to build the wall if he chose to.

"We can do it. I haven't done it. I may do it. I may do it," Trump said of the possibility of declaring a national emergency to build the wall.

The president’s comments came during a lengthy Rose Garden news conference that followed a meeting with top Democratic and Republican congressional leaders as the partial government shutdown neared its two-week mark.

House Speaker Nancy Pelosi, D-Calif., and Senate Minority Leader Charles Schumer, D-N.Y., said the Situation Room meeting with Trump had been contentious. They said they pleaded with him to reopen most of the government, while setting aside the dispute over the wall — but that he refused.

"He resisted," Schumer said. "In fact, he said he'd keep the government closed for a very long period of time, months or even years."

But when Trump appeared in the Rose Garden a short time later, he characterized the meeting as "very productive" if "somewhat contentious." He confirmed that he'd told congressional leaders the shutdown could go on for years, although he said he didn't think it would.

At the same time, Trump seemed to hold out the possibility that the shutdown would never end.

"We'll see what happens. It may get solved, it may not get solved," the president remarked.

"I thought it was really a very, very good meeting," Trump said. "We're all on the same path in terms of wanting to get government open."

But Trump strengthened his rhetoric in his demands for more than $5 billion to build a wall along the southern border, saying it must be built out of concrete or steel. Democrats have rejected providing any new funding for a border wall.

"The southern border is a dangerous horrible disaster," Trump said. And contrary to Democrats' demands, he said the government would stay shut down until the issue was resolved.

"We won't be opening it until it's solved," Trump said.

Questioned about how the 800,000 federal workers now on furlough or working without guaranteed pay would cope without a safety net, Trump said: "The safety net is going to be having a strong border because we're going to be safe."

Trump insisted that most of the workers impacted are behind what he is doing, because border security is more important than next week's paycheck.

"'Mr. President keep going, this is far more important,'" Trump said these workers would say to him if they could.

The leaders of federal workers unions have in fact deplored the ongoing shutdown, decrying its impact on the workforce and pleading for it to end.

Trump promised during his campaign and earlier in his presidency that Mexico would pay for the wall. That has not happened.

Trump said he'd designated a working group led by Vice President Mike Pence that would be meeting with congressional staff over the weekend to come up with a solution to the impasse.

The developments came as the administration worked behind the scenes to shore up support for Trump's wall demand.

Pence called about a half-dozen House Republicans late Thursday to urge them to vote against measures that would reopen the government without new wall funding, amid White House worries that broad GOP defections would give the Democratic effort bipartisan backing.

Two Republican officials confirmed the calls, speaking on the condition of anonymity to divulge the private communications.

Ultimately, just five House GOP lawmakers voted with Democrats on a spending bill that would operate the Department of Homeland Security until Feb. 8, and seven Republicans supported separate legislation that would reopen the rest of the federal government through Sept. 30. GOP officials feared the defections could have been much higher had the administration not gotten directly involved.

Pence's efforts reflect a growing anxiety among congressional Republicans over the two-week shutdown that has halted paychecks for 800,000 federal workers but shown no signs of ending anytime soon - trapping GOP lawmakers between the president's push to fund his signature campaign promise and the shutdown's spreading consequences.

Congress also adjourned until Tuesday, making Wednesday the earliest the federal government can reopen — barring a major breakthrough between the administration and Congress. At that point, the partial shutdown would have lasted 18 days, which would make it the second-longest shutdown in history.

Pence’s outreach centered primarily on moderate members and those who hail from the northeast — some who ended up voting for the bills, and others who didn’t. The vice president’s pitch to Republicans centered on two main points: The country needs funding for a wall, and Congress shouldn’t kick the can to February, when the stopgap funding for DHS would have expired under the Democratic strategy.

Republicans have struggled to stay unified in the face of the shutdown, provoked by a clash between Trump and congressional Democrats over the amount of border wall funding the president has demanded from Congress.

Sen. Cory Gardner, R-Colo., who is up for reelection next year in a state Hillary Clinton won in 2016, has called on Congress to pass spending bills to reopen the government, even if they don't contain Trump's desired level of border wall money. Sen. Susan Collins, R-Maine, a moderate who herself is on the ballot in November 2020 in a blue state, has also argued that legislation that would fund other parts of the government such as the departments of Transportation and Housing and Urban Development shouldn't be held hostage to disputes over the wall.

Meanwhile, their leader, Senate Majority Leader Mitch McConnell, R-Ky., has largely stayed on the sidelines, leaving it to Pelosi and Schumer to resolve the wall dispute with Trump.

McConnell was not present when Trump and other Republican lawmakers appeared outside the White House following Friday's meeting. Aides to McConnell insisted they were not aware of the news conference.

McConnell was frustrated about Trump reversing himself on a short-term funding bill last month — legislation Republicans thought the president would sign - that would have kept the government open. And the top Senate Republican complained to allies about how unreliable the president was to negotiate with, as well as how the president listened to what McConnell deemed as unproductive forces.

Schumer has sought to involve McConnell more, telling White House senior adviser Jared Kushner in a recent meeting that McConnell needed to be a more active participant. But McConnell has told advisers and other senators that he does not feel the pressure or the heat to get more involved, and that his members are not currently itching for the shutdown to end.

"He's the leader of the Senate. Part of this shutdown," Schumer told The Washington Post in a brief interview Thursday. "When he just tosses the ball over to Trump, he's somewhat complicit in the shutdown because Trump is organizing it, Trump is the impetus for it and McConnell is going along."

Josh Holmes, a McConnell adviser, said he saw his main role as keeping the caucus together.