Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — As urgent aid for victims of Hurricane Harvey easily moved through the House on Wednesday, President Donald Trump agreed to a Democratic request to attach short-term extensions of the debt ceiling and government funding measures to the legislation in the Senate instead of a longer time frame proposed by GOP congressional leaders.

At a meeting with leaders of both parties at the White House, the president agreed to take the issues off the table for three months, something Democrats had sought. According to one congressional aide briefed on the meeting, GOP leaders were seeking an 18-month extension of the debt limit ceiling, which would have pushed the matter to after next year's elections. They then floated the idea of a six-month extension, but Trump agreed with Democratic demands of a three-month hike.

That means Congress will have to revisit the issue in December without any of the political cover currently provided by the disaster relief bill. Just after the White House meeting, the House overwhelmingly passed a $7.85 billion aid package to help people in Texas and Louisiana who were devastated by the storm.

The agreement avoids the prospect of a government shutdown or a default on the nation's bills for three more months. But it still put many conservative Republicans in a difficult position: vote against disaster relief or turn their back on principled opposition to increased government spending.

Democrats were quick to announce that the president had agreed to their request for a short-term fix.

"In the meeting, the President and Congressional leadership agreed to pass aid for Harvey, an extension of the debt limit, and a continuing resolution both to December 15, all together. Both sides have every intention of avoiding default in December and look forward to working together on the many issues before us," Senate Democratic Leader Chuck Schumer and House Democratic Leader Nancy Pelosi wrote in a joint statement.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

But Republican leaders were vocally opposed to that approach, and just hours before the White House meeting, House Speaker Paul Ryan called a three-month extension of the debt ceiling “unworkable” and charged Democrats with political gamesmanship.

“I think that’s ridiculous and disgraceful that they want to play politics with the debt ceiling at this moment when we have fellow citizens in need to respond to these hurricanes,” Ryan said at a news conference Wednesday morning. “It’s unworkable and it could put in jeopardy the kind of hurricane response we need to have.”

But Democratic leaders got what they wanted, knowing that the Senate needs at least eight Democratic votes to pass legislation. The move forces the Republicans to vote on another politically treacherous debt limit increase at the end of this year.

Conservatives have long opposed lifting the borrowing limit without budgetary reforms and guarantees of reduced government spending. And few on the Hill like an extension of government funding at current levels because it doesn't account for needs that have changed over the year.

Three Republicans are so opposed to government spending that they voted against Harvey disaster aid. Reps. Justin Amash of Michigan, Andy Biggs of Arizona and Thomas Massie of Kentucky were the lone "no" votes in the House.

The inclusion of the debt ceiling hike into the House bill puts conservatives, especially those from Texas, in a difficult spot. None more so than Sen. Ted Cruz, R-Texas, a vocal opponent of lifting the ceiling who also supports disaster relief for his home state.

Cruz wouldn’t say if he’d support Harvey funding combined with the debt ceiling.

“I think we need to move quickly and provide the relief that is needed, and the best way for that relief package to move quickly is for it to be a clean package not to be loaded down with extraneous issues, so that’s what I hope we would do,” Cruz said on Wednesday.

Senate leaders say that they don’t have a lot of time.

“I believe that FEMA is literally going to run out of money this week, so it’s imperative we get that passed,” Sen. John Cornyn of Texas, the second-ranking Republican in the Senate, said Tuesday evening, referring to the Federal Emergency Management Agency.

It’s not an easy vote for Republicans in the House, either. They will have to vote on Harvey funding a second time, with the debt limit extension included.

Sen. Mark Walker, R-N.C., chairman of the conservative Republican Study Committee, said Treasury Secretary Steve Mnuchin and Republican leaders have been pushing for a way to find the easiest way to pass a debt ceiling with no reforms attached.

“They’ve been trolling along looking for something to attach it to,” Walker said of Republican leaders. “To use the pain and suffering of the people of Texas to me is offensive."

Not all Republicans thought a short-term debt limit was a bad idea.

"I wouldn't do an 18-month thing now. I don't think you blackmail people into doing it," said Rep. Tom Cole of Oklahoma, who added that a three-months extension was "a reasonable thing to do."

"Then we'll deal with the debt ceiling over a longer period of time," he said.