Ghana has summoned South Africa's top envoy to the country over reported "acts of intimidation and harassment" against its citizens and other African migrants in the southern African nation.

Earlier this week, video clips were shared online showing vigilante groups attacking and confronting people they believed were in South Africa illegally - in one of them they challenge a Ghanaian man over his status.

Xenophobia has long been an issue in South Africa and has been accompanied by occasional outbursts of deadly violence.

Ghanaian officials have met the man in the video to offer him support and also urged citizens living abroad to continue being "law-abiding".

The West African nation's foreign affairs ministry said it had also met South Africa's acting high commissioner to Ghana, Thando Dalamba, and raised a formal protest over the recent "xenophobic incidents" against foreigners, including its citizens.