Just hours earlier, the House of Representatives also approved the bill. U.S. George. W. Bush is expected to sign it into law promptly.
Passage of the legislation capped a four-month struggle between Bush and the new Democratic-led Congress over the increasingly unpopular Iraq war, now in its fifth year.
Underscoring Democratic division, House Speaker Nancy Pelosi of California voted against it and Senate Majority Leader Harry Reid of Nevada voted for it.
Fighting In Iraq
Meanwhile, the top U.S. general says killings of Iraqis in Baghdad have risen this month, but are still well below the levels recorded before U.S. and Iraqi forces began a security crackdown.
Marine General Peter Pace, chairman of the U.S. military's Joint Chiefs of Staff, said just over 1,400 civilian deaths were recorded in Baghdad in January and that number dropped to 800 in February, when the new operation began.
Pace said the figure declined further to just over 500 in March and remained around the same in April.
The U.S. military says six of its troops were killed in a series of incidents around Iraq.
Two soldiers were killed by a roadside bomb in Baghdad on May 24. Another roadside bomb the same day killed one soldier in the central Salah Al-Din Governorate, which is predominantly Sunni.
A U.S. soldier was killed by small-arms fire in Diyala Governorate. In the northern Ninawa Governorate, another roadside bomb killed one U.S. soldier.
The military also announced the death of a soldier on May 22 in Baghdad from a roadside bomb.
(compiled from agency reports)