Interactive Graphic

The Senate approved far-reaching new financial rules on Thursday aimed at preventing the risky behavior and regulatory failures that brought the economy to the brink of collapse two years ago and cost millions of Americans their jobs and savings.

The final vote, just after 8:30 p.m., was 59 to 39. Four Republicans voted in favor of the bill, and two Democrats opposed it.

"When this bill becomes law, the joy ride on Wall Street will come to a screeching halt," Majority Leader Harry M. Reid (D-Nev.) said after the vote.

The 1,500-page measure, shepherded through the Senate by Christopher J. Dodd (D-Conn.), chairman of the banking committee, seeks to reshape both Washington and Wall Street.

In providing for the most profound remaking of financial regulations since the Great Depression, the legislation would create a new consumer-protection watchdog housed at the Federal Reserve to prevent abuse in mortgage, auto and credit card lending. It also would give the government power to wind down large failing financial firms and set up a council of federal overseers to police the financial landscape for risks to the global economy. Moreover, the legislation would establish oversight of the vast market in financial instruments known as derivatives, impose new restrictions on credit rating agencies and give shareholders a say in corporate affairs.

Passage of the measure marks a milestone in President Obama's efforts to tackle the financial abuse and excess that contributed to the crisis and prevent another meltdown.

The vote gives Obama his second major legislative victory of the year, following the March passage of his landmark health-care bill. "Our goal is not to punish the banks," he said in the White House Rose Garden hours before the final vote, "but to protect the larger economy and the American people from the kind of upheavals that we've seen in the past few years."

The bill now appears headed to a House-Senate conference committee, where a handful of lawmakers will work to resolve differences between the two chambers. House Financial Services Chairman Barney Frank (D-Mass.) said he aims to wrap up that task in short order.

"I think the president will sign this bill before the Fourth of July," he said.

Thursday's vote hinged in large part on Democrats' ability to win over key Republicans.

Leaders successfully courted GOP Sens. Olympia J. Snowe and Susan Collins, both of Maine, in part by including in the final bill provisions that each wanted. Sen. Charles E. Grassley (R-Iowa) also backed the bill. Equally critical was the last-minute push to win over Scott Brown (R), the Senate's newest member.

Brown's vote was secured partly through the help of Frank, his Massachusetts colleague. In an interview, Frank said Brown called him Wednesday evening as Frank was working out on the elliptical machine in the House gym. Brown wanted assurances that Frank would fight in conference to preserve provisions in the House bill that protect large and solvent Massachusetts institutions, such as State Street and Fidelity, from "unnecessary intrusion" by government regulators. Over the next 24 hours, Frank sent Senate leaders two letters stating his position, and Brown indicated that "on that basis, he could vote for cloture," Frank said.