The US Senate gave final approval Thursday to the most sweeping rewrite of Wall Street rules since the Great Depression of the 1930s, handing President Barack Obama a legacy-shaping political victory. Obama, due to sign the 2,300-page bill into law next week, promised that it would put an end to the kind of 'shadowy deals' which led to the 2008 global economic meltdown that sank the US economy into a deep, job-stealing recession. Speaking at the White House shortly after the senate's mostly party-line 60-39 vote, the president said the legislation would curb Wall Street 'irresponsibility' and protect consumers from big banks' 'tricks and traps.' Obama told Americans wary of his handling of the crisis that the bill would handcuff 'unscrupulous' mortgage lenders who helped bring on the crisis and unleash an 'innovative, creative, competitive' economy less prone to panic. The bill, Obama's top domestic priority, rewrites the rules for arcane financial transactions on Wall Street as well as day-to-day consumer dealings on home mortgages, student loans, credit cards and payday lenders. It was the second historic legislative triumph this year for Obama, who signed a bill overhauling US health care in March but whose Democratic allies face a possible rout in November mid-term elections amid voter unhappiness. In a sign of deep US political polarization, just three of the Senate's 41 Republicans joined 55 Democrats and their two independent allies to pass the measure, while one Democrat opposed the bill. The measure sets up a new consumer financial protection agency, an early-warning system to predict and prevent the next crisis, mechanisms aimed at liquidating rather than saving banks once deemed 'too big to fail.' The legislation also closes loopholes in regulations and requires greater transparency and accountability for hedge funds, mortgage brokers and payday lenders, and arcane financial instruments called derivatives. It also includes a somewhat diluted version of the so-called 'Volcker Rule' -- named for former Fed chairman Paul Volcker -- curbing commercial banks' ability to make speculative investments that are not on behalf of clients. Republican Senate Minority Leader Mitch McConnell charged the measure would impose 'countless burdensome, unintended consequences' and 'stifle growth and kill more jobs in the middle of a deep recession.' 'We're giving Wall Street the strongest oversight it's ever had -- not to stifle it, but to safeguard us,' said Democratic Senate Majority Leader Harry Reid. US Federal Reserve chairman Ben Bernanke hailed the bill as 'a welcome and far- reaching step toward preventing a replay of the recent financial crisis,' while US Treasury Secretary Tim Geithner vowed to take the new standards global. 'We will work hard to bring the rest of the world along with us as we raise the standards of financial protection in the United States and reinforce the competitiveness of our country's most innovative firms,' said Geithner. Republicans mostly opposed the bill, charging it gives too much more power to regulators who failed to stem the previous crisis and does nothing to rein in activities by government-backed mortgage giants Freddie Mac and Fannie Mae. 'What we're going to wind up doing is we're going to be driving jobs and business overseas with this massive piece of legislation that truly doesn't address the problem,' charged Republican Senator Saxby Chambliss. And House Republican Minority Leader John Boehner declared that the measure 'ought to be repealed.' Republican Senators Olympia Snowe and Susan Collins and Scott Brown backed the bill, while Democratic Senator Russell Feingold opposed the measure as insufficiently tough. Senate Banking Committee chairman Christopher Dodd and House Financial Services Committee chairman Barney Frank crafted the compromise legislation from a set of priorities Obama laid out in 2009. The US House of Representatives approved the legislation on June 30 in a largely party-line 237-192 vote. Before passing the bill, senators first voted 60-38 to end debate on the bill and then voted 60-39 to dismiss a final procedural roadblock. 