A former anti-apartheid activist became the third president of post-apartheid South Africa on Thursday, but he is only expected to serve until a vote next year chooses ANC leader Jacob Zuma as his replacement.

In his first speech as president, Kgalema Motlanthe stressed continuity before a nation that has been buffeted by political developments in recent days. He said he would adhere to established policies in areas such as the economy.

Motlanthe announced a Cabinet that included respected figures from ousted President Thabo Mbeki's administration. Chief among them was Finance Minister Trevor Manuel — though Manuel's deputy, who had been involved in planning for the 2010 World Cup, resigned. Motlanthe shifted Mbeki's much-criticized health minister away from the portfolio in charge of AIDS policy.

South Africa's Parliament, which elects the president from among its members and is dominated by the African National Congress, favored former trade unionist Motlanthe with 269 votes to 50 for the main opposition party's nominee. He was sworn in shortly afterward at the presidential office in the Parliament complex.

Motlanthe, 59, is seen as a caretaker until elections next year, when Zuma is expected to become a legislator, then be chosen by Parliament as president.

Zuma, who emerged the victor in a power struggle with Mbeki, watched Thursday's parliamentary vote from the public gallery. Zuma was not eligible for the presidency now because he is not a legislator.

At the announcement of Thursday's results — which reflected unity within the ANC, despite the bruising battle between adherents of Mbeki and Zuma — members of Parliament rose to cheer. Motlanthe gave a two-thumbs up salute to the gallery. Later he briefly addressed the house in measured tones that reflected his reputation as a cool, no-nonsense politician.

"I am deeply humbled and honored by the faith and confidence that the members of this assembly have in me," he said.

He stood, rocking slightly, as he recited the oath of office, pledging to "do justice to all and devote myself to the well-being of the republic and all its people." Then he sat to sign the oath, before being congratulated by ANC and opposition leaders and saluted by security chiefs.

Mbeki, who served as president for more than nine years, did not attend the National Assembly session, and Cabinet ministers who have said they were leaving the government with him also were absent. They included the former deputy president and the defense minister, intelligence and prisons ministers. Other members of his team were later named to Motlanthe's Cabinet.

On Saturday, the ANC ordered Mbeki to quit before his presidential term was to end next year. The party, urged on by Zuma's leftist allies, acted after a judge threw out a corruption case against Zuma on technical grounds and said that Zuma may have been a victim of Mbeki's political machinations.

Amid the drama, the ANC struggled to assure South Africa and the world there was no reason to fear instability in Africa's economic and diplomatic power house.

But the situation is fragile, as was clear Tuesday when Mbeki's office announced that 13 ministers and three deputies had resigned from the 28-member Cabinet, among them the highly respected finance minister, Manuel.

South Africa's stocks and currency reeled. Only later did it become clear that six of those who resigned, including Manuel, had already told the ANC they were willing to serve a new government.

Zuma is seen to owe his rise in politics to support from labor, the South African Communist Party, and the ANC's increasingly impatient youth wing. But Zuma has said repeatedly he does not plan a major departure from the free-market economic policies of Mbeki and Manuel. South Africa enjoyed unprecedented economic growth during Mbeki's tenure, but critics say he did too little to ensure the new wealth trickled down to the black majority.

Motlanthe, addressing Parliament as president late Thursday afternoon, said it was the party, not any individual, that set government policy.

"Mine is not the desire to deviate from what is working," he said. "In a turbulent global economy, we will remain true to the policies that have kept South Africa steady, and that have ensured sustained growth."

He then listed members of his Cabinet, which included many familiar names. But some Mbeki allies, such as Deputy Finance Minister Jabulani Moleketi, kept their distance. Moleketi had been in charge of finances for the 2010 Soccer World Cup in South Africa.

Other changes were likely to be applauded. Manto Tshabalala-Msimang, replaced as health minister by veteran ANC member Barbara Hogan, has long been accused of frustrating the anti-AIDS drive in a country with the highest number of infected people in the world. Motlanthe made her minister in the presidency, where she will be a close adviser but will not hold specific responsibilities.

For all the uncertainty of recent days, some South Africans say this week's smooth transition was a mark of the maturity of their democracy 14 years after the end of apartheid.

South Africans have been anticipating a shift from Mbeki to Zuma at least since December, when Zuma defeated the president in a party election for the ANC's leadership.

Tony Leon, a leading member of the opposition Democratic Alliance, called the ANC ouster of Mbeki in December "brutal, but democratic," and found reason for hope in the events following it that culminated with Thursday's election.

Steve Matomane, an 18-year-old student who was in a crowd outside Parliament, criticized the way Mbeki was ousted. But he said he did not expect much change in the way his country would be governed.

"As South Africans we don't have to panic," he said. "I think Mr. Zuma will do a wonderful job because he was selected by the ANC and they believe in his ability, his capability."