After a negotiating session that ended after midnight, lawmakers hope to wrap up talks Wednesday on a $94.5 billion measure to finance the war in Iraq and provide more hurricane relief to Gulf Coast states.

If successful, lawmakers could clear the legislation for President Bush by the end of the week.

It has been almost four months in the making and was cut substantially Tuesday night, when top negotiators unveiled a bill reduced by more than $14 billion since emerging from the Senate last month at $109 billion.

The GOP-driven negotiation hewed to a White House demand that the emergency bill be kept to Bush's original $92.2 billion request for Iraq and Afghanistan and hurricanes and an additional $2.3 billion to combat bird flu.

The freewheeling negotiating session convened with the purpose of reaching a deal and getting a bill to the House floor by Friday. Otherwise, a Pentagon money crunch would worsen, threatening military operations and training accounts, and the Army in particular is being forced already to curtail some services and shift money to maintain its war operations.

It adjourned with most differences resolved, but the House and Senate were still in disagreement over how to allocate $5.2 billion in flexible federal grants to Gulf Coast states. There also was contention over whether to provide $4 billion in agriculture disaster assistance to farmers to help them deal with high fuel prices and damage from floods and droughts last year.

House Appropriations Committee Chairman Jerry Lewis, R-Calif., said the House would reject the agriculture aid and Senate Republicans weren't putting up much of a fight to protect it and prompt a Bush veto of the entire bill.

The House back in March passed a bill sticking with Bush's request, but the Senate added billions for farm disasters, fisheries aid, veterans medical care and port security and to compensate Texas for taking on evacuees of Katrina.

Most of those moneys were to be dropped, though Sen. Kay Bailey Hutchison, R-Texas, obtained $235 million of $650 million originally passed by the Senate to provide schooling for students displaced by Hurricane Katrina.

Lewis and Senate counterpart Thad Cochran, R-Miss., managed to skirt the veto threat by capping Federal Emergency Management Agency disaster funds at $6 billion — a level that could require Congress to pass more money for FEMA this fall. That freed up more than $1 billion for congressional initiatives.

Cochran successfully pressed for an extra $1 billion in community development block grants in addition to the $4.2 billion requested by Bush to provide housing aid to Louisiana, which felt shortchanged by previous aid bills. But agreement remained elusive on how to distribute that $5.2 billion among Mississippi, Louisiana, Texas and Alabama.

The underlying bill contains $65.7 billion in Pentagon funds for Iraq and Afghanistan, including funding for military operations and maintenance, weapons procurement, personnel and an initiative to locate and disarm roadside bombs. The bill also contains funding for controversial V-22 Osprey tilt-rotor aircraft and more popular C-130 cargo planes.

The war in Iraq is burning $8 billion a month, said Sen. Robert Byrd, D-W.Va., a severe critic of the Iraq war. Total spending for Iraq has hit $318 billion, he said. Those totals don't account for the cost of replacing destroyed or worn out equipment.

The bill also contains $2.3 billion in foreign aid for Iraq, to combat famine in Africa and Afghanistan and support U.N. peacekeeping missions in Sudan, among other purposes.

Lewis said the bill contains an additional $19.2 billion for hurricane relief and reconstruction, including new and rebuilt flood control projects for New Orleans, housing aid for Louisiana and for replenishing FEMA's Disaster Relief Fund.

The emerging compromise provides $1.9 billion for President Bush's recently announced border security initiative to provide 1,000 more Border Patrol agents along the Mexican border, devote $700 million to deploy about 6,000 National Guard troops and build 4,000 spot to detain illegal immigrants.

In doing so, negotiators largely rejected a Senate plan by Judd Gregg, R-N.H., that concentrated on new equipment such as helicopters, vehicle and Coast Guard helicopters and ships.

Cochran, meanwhile, abandoned a bid to devote $700 million to compensating CSX Transportation for its Gulf Coast freight line. The state wants to tear up the line — recently repaired with almost $300 million in insurance money — and use the land for a new East-West highway to help develop the devastated region.

After a passionate defense, Cochran also dropped a provision to give Northrop Grumman Corp., owner of the Ingalls Shipyard in Pascagoula, Miss., perhaps $140 million to $200 million in compensation for business disruption caused by Hurricane Katrina. Northrop Gruman has insurance coverage for the business losses and is currently in litigation.

Instead, at least $140 million would be provided to the Navy to make repairs at the Gulf Coast shipyards.