He made the remark during a closed-door meeting at the White House with congressional leaders on the 14th day of a partial government shutdown.
Trump confirmed after the meeting that he “absolutely” said the shutdown could last more than a year, as first noted by Senate Democratic Leader Charles Schumer (N.Y.) who was at the meeting.
The president added that he didn't think it would last that long, saying Democrats want to make a deal.
“I think it may have been somewhat contentious but it was also productive,” Trump said.
Emerging from the White House, Speaker Nancy Pelosi (D-Calif.) described a "lengthy and sometimes contentious conversation with the president." She said both sides agreed to continue talks but added that Democrats don't believe the standoff is resolved until the government is re-opened.
"We cannot resolve this until we open up government," Pelosi said.
That sentiment was echoed by Schumer, who said "it's very hard to see how progress will be made unless they open up the government."
In contrast to remarks from Democratic leaders, Trump said the group came “a long way” during the meeting.
“I thought it was really a very, very good meeting. We’re all on the same path” toward reopening the government, Trump said.
“We’re not playing games. We have to do it,” Trump said of the wall, arguing it’s essential for “national security.”
He rejected Pelosi’s proposal to reopen most of the closed parts of government while wall talks continue, saying, “We won’t be opening until it’s solved.”
The president spoke in the Rose Garden and was flanked by Vice President Pence, Homeland Security Secretary Kirstjen Nielsen and House GOP leaders.
Trump said he has appointed a working group to negotiate a solution to the shutdown.
Pence said the group will include himself, Nielsen and senior White House adviser Jared Kushner and that they will work with Congress. Talks are slated to begin this weekend, he said.
Friday's meeting with congressional leaders lasted two hours and president trump showed his “passion” for building the wall, according to Pence.
Senate Majority Leader Mitch McConnell (R-Ky.), who did not attend the Rose Garden event, said after the meeting that Trump will “designate his top people” to negotiate with congressional leaders this weekend to find a way to end the government shutdown.
“The news is that the president agreed to designate his top people to sit down with all the leaders’ staffs this weekend to see if we could come up with an agreement to recommend back to us — both to him and to the various leaders,” McConnell told reporters after returning from the White House meeting.
He called the development encouraging because it will form “a working group” about people who best know how to find a solution to the impasse.
But he acknowledged that Democrats need to agree to meet.
“That’s at least encouraging in the sense that if other Democratic leaders’ staffs agree to meet, we’ll have at least a working group of people who know most about this subject to see if they can reach an agreement and then punt it back to us for final sign-off,” McConnell said.
Don Stewart, a McConnell spokesman, pushed back on speculation about the significance of McConnell's absence in the Rose Garden, telling reporters that the Senate GOP leader did not know there was going to be a press conference after the White House meeting. He added that McConnell, who left directly after the meeting, would have attended if he had know that it was going to occur.
House Majority Leader Steny Hoyer (D-Md.) said there was no talk during the meeting of a potential deal to include protections for Deferred Action for Childhood Arrivals (DACA) program recipients.
Arriving back at the Capitol, Pelosi largely declined to respond to questions from reporters and instead deferred to Hoyer. But when asked about her remarks at the White House citing some "progress," she said that was a reference to "the president understanding" the Democrats' position that the impasse won't be resolved before the government is reopened.
House Appropriations Chairwoman Nita Lowey (D-N.Y.) lambasted Trump for suggesting the government could be shut down for years.
"I think he's just been watching too much Fox News," Lowey told reporters. "I have never, never thought I would reach a point in my career where we have had a president speak so irresponsibly about serious issues. You don't bluff about shutting down a government [for years]."
"This is not a sitcom," she added.