LISBON, Portugal (AP) - An anti-austerity alliance led by the moderate Socialist Party and including the Communist Party and radical left Bloc is taking power in Portugal after the eurozone country's president on Tuesday set aside fears about those parties' economic and foreign policies.

LISBON, Portugal (AP) An anti-austerity alliance led by the moderate Socialist Party and including the Communist Party and radical left Bloc is taking power in Portugal after the eurozone country's president on Tuesday set aside fears about those parties' economic and foreign policies.

President Anibal Cavaco Silva announced in a statement on his website that he was inviting Socialist Party leader Antonio Costa to form a government, after two weeks of uncertainty over the country's political future.

Costa's Socialists headed an alliance of leftist lawmakers that two weeks ago unseated a center-right government that had been in power for just 11 days following the Oct. 4 general election. That government had over the previous four years introduced spending cuts and economic reforms following Portugal's 78 billion-euro ($83 billion) bailout in 2011.

The initial defeat of Costa, 54, against the outgoing government shocked the Socialists, who had expected their anti-austerity pledge to seduce voters. But Costa nimbly turned defeat into victory by joining forces with extremists and forcing the government's resignation in a parliamentary vote.

Debt-heavy Portugal emerged as one of the eurozone's weak links during the 19-nation bloc's financial crisis, and the Socialists' pledges to ease austerity have brought fears of a return to overspending.

Costa insists he will abide by Portugal's international agreements, including eurozone spending limits. However, he criticized the outgoing government for being "submissive" in its dealings with the rest of Europe.

The presidential statement said Cavaco Silva "took due note" of assurances provided by Costa about his government's stability and durability a reference to concerns expressed by the head of state about past hostile relations between the three parties and previous proposals from the Communist Party and Left Bloc for Portugal to quit NATO and the eurozone. Costa's written responses to those concerns were not made public.

The Communists and Left Bloc have pledged to vote with the Socialists in Parliament, ensuring its legislation passes, though they aren't expected to join the new government Portugal's seventh in 15 years.

Costa will now choose his Cabinet and present the list to the president for approval. The swearing-in ceremony could come by the end of this week. The new government's first task will be drawing up next year's state budget, which is already overdue.

Portugal was undermined by a decade of average annual growth below 1 percent while record low interest rates in the eurozone invited it to borrow wealth it hadn't created.

Four years of austerity have improved its economic statistics. Portugal's budget deficit in 2010 was more than 10 percent but the European Union estimates it will be around 3 percent by the end of this year. Unemployment, which surged to a record 17 percent after the bailout, has fallen to 12 percent.

But with government debt at 130 percent of gross domestic product the third-highest in the European Union and the three main ratings agencies still classifying Portuguese debt as junk, Portugal's eurozone partners have warned that it can't afford to stray from the path of economic reform and debt reduction.

Costa's leftist alliance says it will reverse cuts in pay, pensions and public services, as well as tax increases that have brought widespread hardship, street protests and strikes in recent years. Some 400,000 Portuguese left to seek work abroad.

Costa says he wants to speed the economic recovery by putting more money in Portuguese pockets and stimulating consumption.

Among the measures planned by the leftist alliance are giving back government workers' cut pay; unblocking pension increases; spending more on the national health service; providing free nursery schools for all 3-year-olds and free school books for all; reducing sales tax at restaurants from 23 percent to 13 percent; and restoring four public holidays that were scrapped to improve productivity.

Questions remain over how Costa's government will pay for those measures.