WASHINGTON – The catastrophic floods brought by Hurricane Harvey to southeastern Texas will pose an immediate test for the White House and Congress, pressing policymakers to approve billions of dollars in recovery funds even though they haven't agreed on much else this year.

White House officials and GOP leaders were already taking stock of the challenge on Sunday, even as the floodwaters in Texas – and the eventual cost of recovery – were still rising. One senior White House official and GOP aides on Capitol Hill said late Sunday they expected to begin discussing an "emergency" package of funding soon to help with relief and rebuilding efforts, even if agreement as to the size of such a package remained premature.

Harvey's devastation poses President Trump's first test in emergency assistance, potentially revealing whether he can overcome Congress's deep divisions over spending and the budget to prioritize aid. It will also test whether Trump can suspend his adversarial governing style and even postpone his own agenda, notably an overhaul of the tax code, to assemble a major – and costly – package that could be directed to law enforcement, emergency relief, schools, infrastructure, hospitals, food banks and several other entities.

The storm comes as Washington was gripped with a budget battle and little time to resolve differences. Many government operations are funded through only the end of September, and Trump has threatened to partially shut down the government if lawmakers don't approve $1.6 billion in funding to construct parts of a wall along the U.S.-Mexico border.

Harvey could upend that budget fight, pressuring politicians to reach a quick resolution. That is because a government shutdown could sideline agencies involved in a rescue and relief effort that officials are predicting will last years.

"I don't think the wall becomes as important now as making sure that the individuals in Texas who have been suffering from this storm are taken care of," said William Hoagland, a former GOP staff director for the Senate Budget Committee.

Also likely to be a factor is the prevailing view among hard-line Republicans – notably during the debate about Superstorm Sandy – that aid packages should be offset by corresponding budget cuts. Democrats are sure to remind Republicans, particularly those from Texas who voted against the Sandy package, of their past stands.

Hoagland noted that dealing with Harvey could actually force lawmakers to reach an agreement to raise the debt ceiling more quickly than they might have otherwise, as the Treasury Department might need more flexibility to extend emergency cash to areas affected by the storm. Treasury Secretary Steven Mnuchin has said the debt ceiling must be raised by Sept. 29 or the government will have a hard time paying all of its bills.

The federal government had only $50.6 billion in cash reserves as of Thursday, down from more than $350 billion in January. It has drawn down this account because Congress has not been able to reach an agreement on how to deal with the debt ceiling.

The economic impact of major storms can be severe.

Hurricane Katrina, in 2005, caused $160 billion in damage and Hurricane Sandy in 2012 caused around $70 billion in damage, according to inflation-adjusted figures provided by the federal government. Both of those storms prompted major fights in Congress, with some prominent Republicans resisting emergency aid packages because of concerns about what it would mean for the federal budget.

Trump has promised to extend federal assistance to help respond to the hurricane but has not commented in any detail. He is planning to visit Texas on Tuesday, but he is also planning on flying to Missouri on Wednesday to bash Democrats as part of his push for a large package of tax cuts.

If the humanitarian crisis worsens in Texas in the coming days, Republicans could be forced to rethink the timing of their push for corporate tax cuts that they had hoped would dominate the fall political calendar.

That is in part because several other federal programs that are often overlooked could draw much more attention.

The federal Disaster Relief Fund administered by the Federal Emergency Management Agency had a balance of $3.8 billion at the end of July, of which $1.6 billion is already obligated, according to the most recent federal report. Trump declared Harvey a major disaster Friday, making Texas victims eligible for relief from that fund. But with damage estimates already rising into the tens of billions of dollars, the fund's balance is almost certainly inadequate.

"All of our plans on disaster recovery are premised with the federal government coming in with a big chunk of short-term FEMA money and then a big chunk of long-term bailout money," said Edward Richards, director of the Louisiana State University Climate Change Law and Policy Project. "With the budget coming up and the debt ceiling coming up, you could easily see this getting absolutely lost in the mix."

One senior Democratic aide suggested that Harvey could help GOP leaders avert a government shutdown at the end of September, even though Trump threatened the shutdown as recently as last week. Adding hurricane relief to a spending bill that is otherwise unpopular among Republicans, the aide said, could help win GOP votes.

The White House had proposed an 11 percent cut to FEMA's budget as a way to free up more money for the military. But GOP leaders had signaled they would ignore that request – at least for the next few months – and keep FEMA funding basically flat. They could come under pressure to boost FEMA's budget, however, particularly because the Atlantic hurricane season is only about half over, and there could be more dangerous storms.

A related issue is the status of the National Flood Insurance Program. Its federal authorization expires Sept. 30, and it is more than $24 billion in debt. The program has a statutory borrowing limit of about $30 billion, and numerous new claims – which congressional aides say are likely post-Harvey – probably will require congressional action to ensure there is enough funding.

Democratic aides said they expect the party to support a Harvey aid package, but they said lawmakers will not be shy about pointing out what they see as hypocrisy among GOP lawmakers, many of whom represent Texas, who opposed Sandy aid.

"Democrats certainly don't forget how these Republicans voted on other aid packages, that's for sure," the senior Democratic aide said Sunday.

Directing emergency funds to areas hit by natural disasters had traditionally been quick bipartisan exercises, but that changed after Hurricane Katrina in 2005.

That evolution has tracked alongside growing attention to federal spending and budget deficits by conservative Republicans, who have increasingly demanded that emergency aid spending be offset by cuts elsewhere in the budget.

That push had its genesis in "Operation Offset" – a 2005 proposal from the Republican Study Committee, a group of House conservatives, to identify spending cuts that would compensate for the approximately $200 billion expected for Hurricane Katrina relief – including cutting farm subsidies, Amtrak funding and postponing the Medicare prescription-drug bill Republicans had approved two years earlier.

The RSC's chairman at the time was Indiana Rep. Mike Pence, who is now the vice president. "We simply can't allow a catastrophe of nature to become a catastrophe of debt for our children and grandchildren," Pence said at the time.

Ultimately, a Katrina aid package passed with only token opposition from Republicans – thanks to a heavy push from President George W. Bush, who many lawmakers from both parties criticized for responding too slowly to a storm that killed more than 1,800 people.

Republican opposition to approving emergency disaster funds without other cuts to offset the new money has persisted.

By the time Hurricane Sandy struck New Jersey and New York in 2012, offsetting any new spending had become a key tenet for most Republicans, so when President Barack Obama pushed for a $60 billion package of federal aid, it sparked more than three months of partisan sparring – a delay that left Democrats and northeastern Republicans fuming while the remainder of the GOP fulminated against the threat of a growing national debt and the inclusion of spending they deemed extraneous in the aid package.

House Speaker John A. Boehner (R., Ohio) ultimately bowed to public pressure, including from Gov. Christie, and brought an aid package to the House floor in January 2015 – although most of the non-Sandy funding was stripped from the bill.

An amendment offered by Rep. Mick Mulvaney (R., S.C.) that would have offset some of the relief funding by instituting an across-the-board cut in other federal spending failed but won support of 157 of 233 House Republicans. The final package passed the House despite the opposition of 179 Republicans in the House and 36 in the Senate.

Texas's Republican senators opposed the Sandy relief bill, arguing that it still included extraneous spending.

Mulvaney is now the White House budget director.

Raw emotions from that episode persist. Rep. Peter T. King (R., N.Y.), who fought hard to secure funds after Sandy, said over the weekend that he would support Harvey relief funds even though Sen. Ted Cruz (R., Texas) tried to block the same type of emergency money for his state in recent years.