Congress gave final approval Thursday to the most ambitious overhaul of financial regulation in generations, ending more than a year of wrangling over the shape of the new rules and shifting the government's focus to the monumental task of implementing them.

The final Senate vote, which came almost two years after the nation's financial system nearly collapsed, was a significant legislative victory for President Obama, who had pledged to rein in the reckless Wall Street behavior behind the crisis and to right the government regulation that failed to prevent it.

The massive bill establishes an independent consumer bureau within the Federal Reserve to protect borrowers against abuses in mortgage, credit card and some other types of lending. The legislation also gives the government new power to seize and shut down large, troubled financial companies -- like the failed investment bank Lehman Brothers -- and sets up a council of federal regulators to watch for threats to the financial system.

Under the new rules, the vast market for derivatives, complex financial instruments that helped fuel the crisis, will be subject to government oversight. Shareholders, meanwhile, will gain more say on how corporate executives are paid.

Obama, who is scheduled to sign the legislation next week, said Thursday that the bill will "protect consumers and lay the foundation for a stronger and safer financial system, one that is innovative, creative, competitive, and far less prone to panic and collapse."

The legislation places much faith -- and much authority -- in regulators to spot brewing problems in the financial system and to prevent another crisis.

Sen. Christopher J. Dodd (D-Conn.), who shepherded the bill through the Senate, said the legislation will help restore Americans' confidence in the badly battered financial system. "More than anything else, my goal was, from the very beginning, to create a structure and an architecture reflective of the 21st century in which we live, but also one that would rebuild that trust and confidence."

The Dodd-Frank bill -- named after Dodd and Rep. Barney Frank (D-Mass.), who ushered it through the House -- passed by a vote of 60 to 39. Three Republican senators -- Scott Brown of Massachusetts and Olympia J. Snowe and Susan Collins of Maine -- joined 57 members of the Democratic caucus in support. Sen. Russell Feingold of Wisconsin was the lone Democratic opponent, saying the measure didn't go far enough.

Some liberals have criticized the bill for failing to more aggressively alter the structure of Wall Street and for leaving so many critical decisions to federal regulators, who missed many of the warning signs before the crisis.

"It's the dumbest argument I've ever heard," Dodd countered. "What do they expect me to write, a 100,000-page bill? This is far beyond the capacity, the expertise, the knowledge of a Congress" to detail every new regulation, he said.

Meanwhile, most Republicans continued to argue that the bill creates bigger, more intrusive government and fails to prevent future bailouts of financial companies using taxpayers' money. These critics joined with leaders in the banking and business communities in insisting that the new regulations will undermine the competitiveness of the U.S. economy, stifle growth and kill jobs at a time when unemployment is high.

"The White House will call this a victory," said Senate Minority Leader Mitch McConnell (R-Ky.). "But as credit tightens, regulations multiply and job creation slows even further as a result of this bill, they'll have a hard time convincing the American people that this is a victory for them."