A South African tourist who was kidnapped in 2011 by al-Qaeda's North Africa branch while travelling in Mali has been released and has returned back home, according to South Africa's government.

Stephen McGowan, who was released on July 25, was one of four foreigners touring Mali on motorbikes who were seized in a restaurant in Timbuktu.

A German was killed in the kidnapping. A Dutch hostage was freed in 2015 in a raid by French special forces and a Swede was released in June this year.

The kidnappers had wanted $5m for the Swede's release, but the government rejected the demand, Swedish Radio said.

READ MORE: On the road with Niger's peacekeepers in Mali

"We would like to warmly welcome him back home and wish him good health, good fortune in his life as a free man," Maite Nkoana-Mashabane, South Africa's foreign minister, said, adding that no ransom had been paid.

McGowan, 42, is undergoing medical tests but had no major injuries, Nkoana-Mashabane said.

McGowan's mother died in May, but other close family members expressed their joy at his return.

"It was a big surprise when Stephen walked through the door," his father, Malcolm, said. "He felt as sound and as strong as before."

McGowan's wife, Catherine, told the news briefing: "The first thing he said to me was: 'Your hair has grown.' I said to him 'Actually, your hair is longer than mine now.'"

Foreign hostages

In early July, McGowan was included in a proof-of-life video released by the al-Qaeda-linked Nusrat al-Islam wal Muslimeen group in Mali.

The video showed six foreign hostages shortly before French President Emmanuel Macron arrived in Mali for an anti-terrorism summit.

"No genuine negotiations have begun to rescue your children," a narrator of the video said.

Al-Qaeda fighters are still believed to be holding a Colombian nun taken from Mali, an Australian doctor and a Romanian man seized at different times in Burkina Faso, and an American who was working with a nonprofit organisation in Niger.

The armed group seized control of Mali's north in 2012.

While they were forced out of strongholds a year later by a French-led military intervention, al-Qaeda fighters continue to attack Malian and French soldiers and UN peacekeepers.

Five regional countries - Mali, Mauritania, Niger, Burkina Faso and Chad - have now created a 5,000-strong multinational military force against the armed group.