The vote dramatically alters the city's political landscape. Many would-be mayoral candidates are expected to drop out of the race rather than run against a popular incumbent with unlimited cash to spend. Bloomberg founded the financial news service that bears his name and is worth an estimated $20 billion.
The former CEO was first elected as a Republican in 2001, while smoke was still rising from the ruins of the World Trade Center; he later became an independent.
Bloomberg's announcement three weeks ago that he would try to rewrite the term-limits law led to a bruising debate - and a politically damaging one for the mayor, who had previously backed the term limits law and even vetoed a 2002 bill to amend it, saying it was an attempt by politicians to change the rules for personal gain.
Scores of New Yorkers came to testify during 20 hours of council hearings, and a poll found that registered voters overwhelmingly disapproved of the plan.
After the vote, Bloomberg issued a statement praising the council for acting to "give the people of New York a fuller choice" next year. He said the city must turn its focus to softening the fallout from the financial downturn.
He was not present for Thursday's vote, but as he left City Hall shortly afterward, a group of protesters chased him to his SUV, shouting that he was a "sellout."
"You're disgusting!" they yelled. The mayor's face was red as he silently got into his car, surrounded by aides and his security detail.
During the debate on Thursday, Councilman Charles Barron, who voted against the bill, urged his colleagues to say "no to bullying, no to billions of dollars and yes to the people." And Councilman Tony Avella said: "You should all be voted out of office for voting for this."
Opponents argued that the mayor was going over the heads of voters, who approved term limits twice in the 1990s. Many critics said they did not disagree with Bloomberg's goal of adding a third-term option but faulted the way he went about it.
"Everything has been wrong with this process, and we should not be party to it," said Councilman Bill de Blasio.
Council Speaker Christine Quinn acknowledged the "difficult" decision each council member had to make, but agreed with Bloomberg that the city needs continuity in government to get through the financial turmoil. The crisis on Wall Street has done severe damage to the city's financial fortunes.
"Our city, already in recession, is headed for a long and deep downturn," she said. "In challenging times like these, the voters should have the choice, the choice to continue their current leadership."
As the measure passed, a shout came from the spectators' section on the balcony: "Shame on you, shame on all of you!" Several council members who opposed the Bloomberg plan made a last-minute push for a voter referendum on term limits, but their measure was defeated.
Bloomberg's success at passing the term-limit proposal comes after several high-profile failures for the 66-year-old mayor. During his first term, he lost a campaign to put a new football stadium on Manhattan's West Side. The stadium would have been the centerpiece of the city's bid to host the 2012 Summer Olympics.
Earlier this year, he failed to get the state Legislature to approve a controversial plan to toll cars entering the most crowded parts of Manhattan, with the goal of cutting traffic and pollution.
Bloomberg's best-known legislative successes came early in his City Hall career. He persuaded the City Council to back his campaign to outlaw smoking in bars and restaurants. He also took more direct control of the city's school system.