People gather in Nairobi at a rally where it was announced that Raila Odinga would be the candidate of an opposition alliance in August’s presidential election. (Khalil Senosi/Associated Press)

A coalition of opposition parties announced Thursday that Raila Odinga, a three-time presidential candidate and former prime minister, would be its standard-bearer in elections in August.

The announcement sets up a rematch between Odinga and Kenyan President Uhuru Kenyatta, who narrowly won the last election in 2013. Odinga contested the results of that race, alleging irregularities in the counting of votes. But Kenya’s Supreme Court rejected the challenge and declared Kenyatta the victor.

Odinga is now 72, and this is seen as his final chance to win the presidency.

He was also a leading candidate in 2007 elections, winning widespread support as he faced off against President Mwai Kibaki. But Kibaki was declared the victor. That announcement triggered ethnically related violence that resulted in more than 1,000 deaths.

Kibaki is a member of the Kikuyu tribe, as is Kenyatta, the son of the nation’s founding father, Jomo Kenyatta. Odinga is from the Luo tribe. Politics in Kenya is strongly influenced by tribal affiliation.

In 2010, Kenyatta and his running mate, William Ruto, were charged by the International Criminal Court with instigating mobs that went on a killing spree in Nairobi slums and in parts of the countryside after the 2007 elections. The men insisted they were innocent. Prosecutors later dropped the charges, saying key witnesses had been intimidated.

Odinga became prime minister in 2008 as part of a power-sharing agreement with Kibaki.

Last year, Odinga led protests against Kenya’s electoral commission, alleging that it favored the government and could not be trusted to oversee the 2017 elections. Following the demonstrations, the members of the commission stepped down, paving the way for new ones to be named.

Odinga is running on the ticket of the National Super Alliance (NASA), which was formed in January and comprises four key opposition parties: the Orange Democratic Movement, the Wiper Democratic Movement, the Amani National Congress and FORD-Kenya.

Odinga is the leader of the Orange Democratic Movement. His nomination was announced at a rally held Thursday at Nairobi’s Uhuru Park, which was attended by thousands of opposition supporters.