Former prime minister Raila Odinga has been named as Kenya's opposition presidential candidate for the August general election.

Senior leaders of the National Super Alliance (NASA) coalition made the announcement at Uhuru Park in the capital Nairobi on Thursday during a rally attended by tens of thousands of supporters.

In a repeat of the 2013 election line-up, 72-year-old Odinga will challenge President Uhuru Kenyatta, who is running for a second and final five-year term.

Kenya's five main opposition leaders hope their unprecedented alliance will be enough to defeat the ruling Jubilee Party on August 8.

Kalonzo Musyoka was named Odinga's running-mate and prospective deputy president - another repeat of the 2013 scenario.

Other positions were divided among senior opposition leaders, Musalia Mudavadi, Moses Wetangula and Issac Ruto.

Addressing the crowd, Mudavadi said he and the others had "sacrificed personal ambitions" to present a united front, an effort that has always failed in the past.

"All NASA partners are equal, and one plays the role of the first among equals," he said.

Hope for peace

Kenyans hope the vote will be largely peaceful, as it was in 2013.

But the country is still haunted by the two months of violence that followed the disputed 2007 presidential poll, when political protests spilled into ethnic bloodletting with more than 1,200 people killed.

Odinga ran and was defeated in the last two elections and comes from one of Kenya's most powerful political families.

READ MORE: Kenya's Odinga - I won't run if commission not reformed

He was prime minister of Kenya from 2008 to 2012 as part of a power sharing government set up to end the violence after former president Mwai Kibaki's contested win in late 2007.

Odinga, who identifies as a left-winger, named his first son Fidel, after the Cuban leader, and has vowed to root out corruption, reform the public sector and strengthen local government.

A hospital that his father helped build in the country's west, the family's power base, is nicknamed Russia after its main financial backers.

Odinga has refused to rule out street protests if the elections are "rigged".