WASHINGTON — House Democratic leader Nancy Pelosi on Thursday rejected the idea of paying for President Donald Trump’s border wall in exchange for helping hundreds of thousands of young immigrants avoid deportation.

Funding for the wall — a top Trump priority — and legal protections for so-called Dreamers, a key Democratic goal, should not be linked, Pelosi said.

“They’re two different subjects,” she said.

READ MORE: Trump says any DACA deal is a ‘total waste of time’ without border wall

Her comments came as the House and Senate approved a stopgap bill Thursday to keep the government funded through Dec. 21. The measure, approved by voice votes in near-empty chambers, now goes to the White House.

Trump has promised to sign the two-week extension to allow for ceremonies this week honoring former President George H.W. Bush, who died Nov. 30. But he wants the next funding package to include at least $5 billion for his proposed wall, something Democrats have rejected. Trump is set to meet Tuesday at the White House with Pelosi and Senate Democratic leader Chuck Schumer.

Pelosi, who is seeking to become House speaker in January, said the lame-duck Congress should now pass a half-dozen government funding bills that key committees have already agreed on, along with a separate measure funding the Department of Homeland Security, which oversees the border. Funding for the homeland agency should address border security and does not necessarily include a wall, Pelosi said.

Funding for the homeland agency should address border security and does not necessarily include a wall, Pelosi said.

Most Democrats consider the wall “immoral, ineffective, expensive,” Pelosi said, noting that Trump promised during the 2016 campaign that Mexico would pay for it, an idea Mexican leaders have repeatedly rejected.

Even if Mexico did pay for the wall, “it’s immoral still,” Pelosi said.

Protecting borders “is a responsibility we honor, but we do so by honoring our values as well,” she added.

Schumer said Thursday that a bipartisan Senate plan for $1.6 billion in border security funding does not include money for the 30-foot-high (9-meter-high) concrete wall Trump has envisioned. The money “can only be used for fencing” and technology that experts say is appropriate and makes sense as a security feature, Schumer said.

“This is something Democrats have always been for: smart, effective, appropriate border security,” he said on the Senate floor.

If Republicans object to the proposal because of pressure from Trump, Schumer said lawmakers should follow Pelosi’s advice and approve six appropriations bills and a separate measure extending current funding for Homeland Security.

Either option would avert a partial government shutdown, which lawmakers from both parties oppose, he said.

“The one and only way we approach a shutdown is if President Trump refuses both of our proposals and demands $5 billion or more for a border wall,” Schumer said. He called the wall “a nonstarter” for Democrats, who face increasing pressure from outside groups and liberal lawmakers to resist Trump’s continued push for the barrier, which Trump says is needed to stop an “invasion” of Central American migrants and others from crossing into the country illegally.

Schumer called the spat over the wall unnecessary, noting that the administration has not spent more than $1 billion approved for border security in the budget year that ended Sept. 30. “The idea that they haven’t spent last year’s money and they’re demanding such a huge amount this year makes no sense at all,” he said.

Senate Appropriations Committee Chairman Richard Shelby said he prefers to include Homeland Security in an omnibus package containing seven unresolved spending bills for the current budget year.

“I believe the best route is to keep all seven together and pass them,” the Alabama Republican told reporters Thursday. Lawmakers have “made a lot of progress” in recent weeks on the seven spending bills. “I’d like to conclude it,'” he said.

Associated Press writers Alan Fram and Padmananda Rama contributed to this story.