PRETORIA (Reuters) - Trade unionist-turned-businessman Cyril Ramaphosa was sworn in as South Africa’s president on Saturday, vowing to create jobs and tackle deep-rooted corruption that has strangled economic growth.

Ramaphosa, who becomes the country’s fourth democratically elected president since the end of apartheid, took the presidential oath before a crowd of about 32,000 people in a rugby stadium in the capital, Pretoria.

“Today our nation enters a new era of hope and renewal,” said Ramaphosa, 66, wearing a dark suit and flanked by foreign leaders including Congolese President Felix Tshisekedi and Chinese Premier Li Keqiang.

“Let us forge a compact for growth and economic opportunities, for productive land and wider opportunities ... A compact of an efficient, capable and ethical state. A state that is free from corruption,” said Ramaphosa, a former anti-apartheid activist and trade union leader who has wide-ranging business interests.

Ramaphosa’s African National Congress (ANC) clinched a 57.5% majority in a general election earlier in May, down from 62% in 2014 as voters turned against the ruling party due to revelations about government corruption and record unemployment.

Ramaphosa narrowly won the ANC leadership race in late 2017 and replaced scandal-plagued predecessor Jacob Zuma as state president in February 2018, a year before the latter’s term was due to expire.

Since then he has struggled to mend factions in the party opposed to his reform plans, especially at cash-strapped state power supplier Eskom. His promises to punish party members accused of corruption have also stuttered.

Slideshow ( 11 images )

The challenges facing Ramaphosa were highlighted on Friday by the resignation of Eskom’s chief executive, who quit only a year since he was appointed to stabilize the utility and keep the lights on after nationwide blackouts.

Also on Friday, S&P Global Ratings kept South Africa’s credit rating unchanged one notch below investment grade.

The economy is set for a first quarter contraction after mining and manufacturing weakened, prompting the central bank to cut its 2019 growth forecast to 1%, well below the rate of at least 3% needed to bring down debt, budget deficits and joblessness.

“The challenges our country faces are huge and are real but they are not insurmountable. They can be solved and I stand here to say they are going to be solved,” Ramaphosa said in his speech on Saturday.

Many in the crowd at Pretoria’s packed Loftus stadium were optimistic.

“I love my president Cyril Ramaphosa. I know that as long as we have him here he is going to give us jobs and change many things,” said Patience Shabangu, 45, a volunteer at a local clinic.

Political analysts say a key test of Ramaphosa’s ability to deliver reforms will be his announcement of new cabinet, which is expected to take place next week.

“The speech was an honest and brutal reflection of South Africa’s recent problems. But it was also optimistic,” said Daniel Silke, director of the Political Futures Consultancy.

“He will be judged on a very high bar and the next step is the cabinet. If it contains any semblance of the dead wood from the past he will be severely critiqued,” Silke added.