President Donald Trump on Friday said he told Democrats earlier in the day that he would keep the government partially closed for years, or as long as it takes to get funding for his proposed border wall.

Trump also asserted that he had the authority to declare a national emergency and build the wall without congressional approval.

In comments delivered from the White House Rose Garden, Trump painted a different picture from Democrats about a two-hour meeting that took place between the president and top Democrats.

Trump described the meeting as "very productive" and said he had designated a group to advance talks over the weekend. Democrats described the negotiation as "contentious" and showed little optimism about ending a partial government shutdown.

Read more: Trump is considering using emergency powers to build a border wall

Bipartisan congressional leaders huddled with Trump as they try to break an impasse over the president's demand for $5 billion to build his proposed border wall.

Trump threatened to keep nine U.S. departments closed "for a very long period of time — months or even years" — until he gets the funding, Senate Minority Leader Chuck Schumer said. Trump confirmed making the comments.

The president said Friday that he had the authority to build a wall without congressional approval, but said he preferred "a negotiated process."

"Absolutely, we could call a national emergency because of the security of our country," Trump said. "We may call a national emergency and do it very quickly."

The news that the president had considered circumventing Congress was earlier reported by ABC News.

Vice President Mike Pence, also speaking from the Rose Garden, said that Trump had selected him as well as White House senior advisor Jared Kushner and Kirstjen Nielsen, secretary of the Department of Homeland Security, to meet with top-level Democratic and GOP lawmakers for talks this weekend.

"We will work earnestly over the weekend, we will work in good faith," Pence said.