US President George W Bush has signed a bill allocating $100bn (£50bn) of new funding for the wars in Iraq and Afghanistan until the end of September.
The new budget does not set a timetable for US troop withdrawal
The president's approval came hours after the House of Representatives and Senate voted in favour of the bill.
The bill is a compromise measure between Republicans and Democrats, after the Democrats dropped demands for a timetable for a US troop withdrawal.
Hours later, the US military reported the deaths of five soldiers in Iraq.
Correspondents say the death toll for US troops in May - currently at least 85 - looks like being one of the highest since the invasion of Iraq in 2003.
The Senate voted to send the legislation to the president by 80 votes to 14, after the House gave its approval by a margin of 280 to 142.
The deal ended months of wrangling over demands by Democrats, who control Congress, for checks on Iraq funding.
Democrats had wanted timetables for withdrawal built into any funding bill, but those conditions prompted Mr Bush to veto earlier legislation.
Without a two-thirds majority in Congress, the Democrats were unable to overturn any threat of a further presidential veto and eventually agreed to a compromise deal.
"This is like a fig leaf, this is a token, this is a small step forward, instead we should have a giant step forward into a new direction," said House Speaker Nancy Pelosi.
Democrats did manage to secure cash for domestic issues, including a $2.10 rise in the minimum wage, and insisted the new budget was not a victory for the White House.
"The days of blank cheques and green lights for his failed policy are over," Senate majority leader Harry Reid said.
Speaking at the White House ahead of the vote, Mr Bush praised the negotiated compromise, saying the bill reflected "a consensus".
Among the terms of the new deal are requirements that the Iraqi government demonstrate progress on specific issues to be assured of continuing US support.
Those "benchmarks" were included after pressure from Democrats, but can be over-ruled by the president.
"By voting for this bill, members of both parties can show our troops and the Iraqis and the enemy that our country will support our servicemen and women in harm's way," the president said.
He also told reporters that the coming weeks and months in Iraq would be vital for the new US security strategy in Iraq.
The last of the 30,000 US troop reinforcements would arrive in Baghdad by the middle of June, Mr Bush predicted.
"We are going to expect heavy fighting in the next weeks and months and we can expect American and Iraqi casualties," he said, pledging to stay on the offensive.
Meanwhile, a CBS News/New York Times opinion poll suggests that a record number of Americans are pessimistic about the outcome of the war in Iraq and now believe it was a mistake.
Of those polled, 76% said they thought the war was going badly, up 10 points in one month, while 61% of those polled said the US should have stayed out of Iraq.
And six in 10 wanted a timetable for US troops to withdraw from Iraq - an issue that was dropped from the bill passed by Congress.