WASHINGTON -- Insider trading by members of Congress, their top staff and executive branch officials would be banned by legislation that passed the Senate on Thursday.

Although insider trading is illegal for anyone, some had argued that the STOCK Act, which passed 96 to 3, was needed to close loopholes that let lawmakers and lobbyists profit from "political intelligence."

"We are entrusted with a profound responsibility to the American people to look out for their best interest, not for our own financial interest," said Sen. Kirsten Gillibrand (D-N.Y.), one of the lead sponsors on a measure that garnered rare bipartisan support, including from Republican senators such as Maine's Susan Collins and Massachusetts' Scott Brown.

"Bottom line, members of Congress have to live by the same laws everyone else does," said Brown. "With approval ratings of Congress at an all-time low, this bill represents an opportunity to build some trust with the American people."

The three senators who opposed the bill were Tom Coburn (R-Okla.), Richard Burr (R-N.C.) and Jeff Bingaman (D-N.M.). The two Republicans both argued that the measure was unnecessary and that the law already bars insider trading.

"Senator Burr voted against cloture on the bill because there are already laws in place to address this critical issue," said Burr spokesman David Ward. "Members of Congress are elected to serve the people, not make money for themselves, and any Member or staff member who breaks the already existing insider trading laws should be held responsible."

Bingaman added that the measure will pose problems for many federal workers. "I can't support a bill that places unreasonable and burdensome reporting requirements on over 300,000 federal workers," Bingaman said. "It is my hope that this legislation can be improved as the process moves forward."

The Senate legislation also requires lawmakers and senior staffers to declare within 30 days if they sell a significant financial asset, in theory letting constituents know if a legislator might have had a financial interest in a measure.

A number of attempts to do other things with the bill, including banning earmarks, failed.

One amendment that aimed to make it even harder for lawmakers to profit from inside information also failed. Offered by Sens. Jeff Merkley (D-Ore.) and Sherrod Brown (D-Ohio), it would have required legislators to divest stock holdings that could create conflicts of interest or to put them in blind trusts.

"Baseball players can't bet on their games. We should not be able to hold stock in individual companies and then bet on -- then vote on issues that affect our holdings," Brown said.

His colleagues, however, thought that went too far.

"This will be the first time that I'm aware of that in the legislative branch we would require divestment of personal holdings," said Sen. Joe Lieberman (I-Conn.), one of the bill's lead sponsors. "For that reason, I oppose the amendment."

Lieberman argued that the transparency created by the bill would keep people honest. "Divestment, in my opinion, is a step too far," he said.

The bill now must be passed by the House, where Majority Leader Eric Cantor (R-Va.) said he would bring it up by the end of the month. It was not clear, however, that it would be the same measure passed by the Senate, meaning the legislation could still be tied up in a struggle between the two chambers. President Obama has said he would sign the Senate version.

After the Senate passed the bill, the president said, "Last week, I called on Congress to pass a bill that makes clear that Members of Congress may not engage in insider trading. No one should be able to trade stocks based on nonpublic information gleaned on Capitol Hill. So I'm pleased the Senate took bipartisan action to pass the STOCK Act. I urge the House of Representatives to pass this bill, and I will sign it right away."

Lucia Graves contributed to this report.

Michael McAuliff covers politics and Congress for The Huffington Post. Talk to him on Facebook.

