Renowned Ghanaian poet and statesman Kofi Awoonor is among the 59 people confirmed dead so far in an attack by Somali fighters on a Nairobi shopping mall, Ghana's president has said.

John Dramani Mahama on Sunday said in a statement: "I am shocked to hear the death of Professor Kofi Awoonor in the Nairobi mall terrorist attack. Such a sad twist of fate."

Awoonor, 78, was killed and his son wounded at the Westgate mall, Ghana's Deputy Information Minister Felix Kwakye Ofosu said. He added that Awoonor's son has been discharged from the hospital.

Awoonor had been due to appear at the Storymoja Hay literary festival in Nairobi on Saturday.

Kwame Dawes, a cousin of Awoonor as well as a poet who was in Nairobi at the time of the attack, said Awoonor and his son were separated when the shooting started.

"I think the son went to pick up something at the mall. Professor Awoonor was in the parking garage waiting for him," Dawes told the AFP news agency.

"The son was shot while he was inside the mall. We don't know at what point the professor was shot."

Renowned diplomat and poet

Awoonor served as Ghana's ambassador to Brazil and Cuba in the 1980s, and was Ghana's representative to the United Nations under the presidency of Jerry Rawlings from 1990 to 1994.

He was also president of the Council of State, an advisory body to the president, but stepped down from that role earlier this year.

Kofi Awoonor is easily one of the great poets of Africa and has been for many years. Kwame Dawes, Poet and cousin of Kofi Awoonor

He was a renowned writer, most notably for his poetry inspired by the oral tradition of the Ewe people, to which he belonged.

Much of his best work was published in Ghana's immediate post-independence period, part of which he spent in exile after the first president Kwame Nkrumah, whom Awoonor was close to, was overthrown in a coup.

Awoonor returned to Ghana in 1975 and was later arrested and tried over his suspected involvement in a coup, according to a biography from the US-based Poetry Foundation.

He was released after 10 months, and the foundation said his imprisonment influenced his book "The House by the Sea".

During his time in the United States in the early 1970s, Awoonor was chairman of the Department of Comparative Literature at the State University of New York at Stony Brook.

According to Dawes, Awoonor was planning to continue writing essays and poetry, including on his experience in government.

"Kofi Awoonor is easily one of the great poets of Africa and has been for many years," he said. "There's a great deal of respect for him and admiration of his work. This has been a big blow and a major loss."