JOHANNESBURG (Reuters) - Nearly one month after the African National Congress lost its parliamentary majority in the most competitive election since the end of apartheid, 10 South African political parties have agreed to form a government of national unity.

The collaboration between parties from across the political spectrum has thrust the country into uncharted territory, as the ANC will have to share power for the first time in the democratic era.

President Cyril Ramaphosa, re-elected for a second five-year term with the help of smaller parties, is expected to give other parties cabinet positions in return for backing the government he now leads.

Below are the 10 parties that make up the unity government.

AFRICAN NATIONAL CONGRESS

The ANC, the legacy liberation movement of Nelson Mandela, won the most votes in the May 29 election, but it saw its support slide because of voter frustration over issues like power cuts and a strong showing by a new party backed by former President Jacob Zuma.

The ANC has 159 seats in the 400-member National Assembly, down from the 230 it secured in the 2019 election and short of the outright majority it had enjoyed for 30 years.

DEMOCRATIC ALLIANCE

The white-led, pro-business DA won the second-most votes last month, getting 87 seats in the lower house of parliament.

It was among the first to sign up to join the ANC in the unity government, and its support was decisive in ensuring Ramaphosa was re-elected by lawmakers for a second term.

In return, the ANC backed a DA candidate for the position of deputy speaker of the National Assembly. The DA has made clear it also wants significant representation in Ramaphosa's cabinet.

INKATHA FREEDOM PARTY

The traditionalist IFP draws much of its support from Zulu people in South Africa's KwaZulu-Natal province, where with the backing of the ANC and the DA it now controls the provincial legislature.

The IFP has 17 seats in the National Assembly, making it the fifth-largest party.

PATRIOTIC ALLIANCE

The PA, known for its hardline stance on immigration, won nine National Assembly seats.

Its leader Gayton McKenzie, a former gangster who served jail time for robbery, has said the PA wants the home affairs or police portfolios in Ramaphosa's cabinet.

FREEDOM FRONT PLUS

The FF+, with six seats, has as its base white Afrikaans-speaking voters.

It made a pre-election pact with the DA, IFP and others to try to keep the ANC out of power but last week said it had decided to join the unity government to help "restore and rebuild South Africa".

UNITED DEMOCRATIC MOVEMENT

The UDM won three seats. It had originally sided with a political alliance formed in opposition to the government of national unity, called the "Progressive Caucus," before switching sides.

RISE MZANSI

RISE Mzansi competed in its first election last month. Founded last year by former newspaper editor Songezo Zibi, the party won two seats.

AL JAMA-AH

Muslim political party Al Jama-ah, which won two seats, also abandoned the Progressive Caucus to join the unity government.

One of its leaders has been mayor of Johannesburg for the past year as part of a coalition involving the ANC and hard-left Economic Freedom Fighters.

PAN AFRICANIST CONGRESS OF AZANIA

The PAC won one seat. It broke away from the ANC in the 1950s because of the ANC's multiracial stance, instead advocating "Africanist" policies for Black South Africans.

GOOD

GOOD also won one seat. Its leader Patricia de Lille, a former mayor of Cape Town for the DA, has worked alongside the ANC in national government before, serving as tourism minister and public works and infrastructure minister during Ramaphosa's first term.

(Reporting by Tannur Anders; Editing by Alexander Winning and Anil D'Silva)

By Tannur Anders