MONTEVIDEO, Uruguay (AP) — Tabare Vazquez, a former mayor of this capital city, won Uruguay’s presidential election Oct. 31, becoming the nation’s first leftist leader and strengthening a regional shift toward left-leaning governments.

With all votes counted, Uruguay’s Electoral Court said Vazquez won 50.2 percent of the vote to 34 percent for Jorge Larranaga of the National Party. Guillermo Stirling of the Colorado Party had 10 percent, the official results showed.

Vazquez claimed victory after exit polls showed he had won Sunday’s race, triggering raucous celebrations. Thousands of Uruguayans thronged the streets overnight amid the boom of fireworks and chants of “Viva, Tabare!”

“After all Uruguay has been through the last few years, we finally have something to cheer,” said Juan Gonzalez, a 36-year-old shoe salesman.

The win for Vazquez, 64, adds this South American nation of 3.4 million to a regional shift to the left. Leftist and center-left leaders have come to power in Argentina, Brazil, and Venezuela over disenchantment with financial turmoil and free-market economic policies.

Vazquez, the candidate of the Progressive Meeting-Broad Front-New Majority (EP/FA/NM) coalition, has promised moderate policies with an emphasis on helping the poor.

“This is a proud night for Uruguayans,” said Vazquez, an oncologist, his words echoing over a crowd of thousands of flag-waving supporters gathered outside a downtown Montevideo hotel.

“I want you to know I’m going to defend you. This victory is yours,” he declared.

This was the first electoral defeat for two of the country’s more traditional parties. The Colorado Party and the National Party alternately controlled the presidency for more than 170 years. That lock on power has been interrupted occasionally by military rule, most recently during the country’s 1973-84 dictatorship.

Rising public anger over a 2002 economic crisis set the backdrop for the campaign. Uruguay was lashed by financial turmoil in neighboring Argentina two years ago, unleashing a severe currency devaluation and the collapse of several leading banks.

Uruguay, long one of Latin America’s most stable economies, is climbing out of an economic depression in which the economy shrank by 11 percent two years ago. The upheaval left one of every three Uruguayans below the poverty line — a blow to a country where generous social benefits had for years assured one of the region’s highest living standards. Thousands of young Uruguayans emigrated to Europe and the United States.

Vazquez was widely seen as the front-runner in a race against Larranaga and Stirling. Both men conceded the race before initial results were even released.

The vote highlighted a dramatic shift for this longtime U.S. ally. American-Uruguayan relations blossomed under President Jorge Batlle even as other leftist leaders such as Venezuela’s Hugo Chavez took power in the region, emphasizing greater distance from Washington on a range of economic, trade and foreign policy issues. Batlle was barred from seeking a second consecutive, five-year term.

Vazquez has stressed he will strengthen the country’s ties with regional neighbors Argentina and Brazil and will restore relations with Cuba.

In other South American elections:

• In Venezuela, pro-government candidates swept all but two of 23 governorships in regional elections Sunday, according to preliminary results, giving a boost to President Hugo Chavez.

• In Chile, voters gave strong support to the center-left government of President Ricardo Lagos in nationwide municipal elections, but the right-wing opposition won the mayoral race in Santiago.

• In Brazil, President Luiz Inacio Lula da Silva was handed a big defeat in a major test of his ruling party’s influence, as his party lost mayoral runoffs in Sao Paulo and several other key cities.