The move came a day after the House of Representatives approved an almost identical measure.
The bill establishes military tribunals to prosecute terror suspects. It also forbids cruel and unusual punishment of detainees.
Critics say it would give interrogators too much power to decide how to treat prisoners. But President George W. Bush said it would give the United State the necessary tools to protect the American people.
"We cannot be able to tell the American people we are doing our full job unless we have the tools necessary to do so," Bush said on September 28. "And this legislation passed in the House [of Representatives] yesterday is a part of making sure that we do have the capacity to protect you. Our most solemn job is the security of this country."
The bill now goes to Bush for his signature.
Meanwhile, the U.S. House of Representatives has approved legislation to extend and tighten sanctions on companies doing business with Iran.
The bill renews existing economic sanctions on firms investing in Iran's energy sector, and it establishes penalties for anyone helping Iran develop weapons of mass destruction. It also authorizes aid for groups working to promote democracy in Iran, including independent broadcasting organizations.
The bill now goes to the Senate.
(with Reuters, AFP, AP, VOA)