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.


It cited a video clip showing a group of South Africans questioning a Ghanaian man. The group demand to see the man's documents and even when he produces them, they question their authenticity, before telling him to go and fix your country.


According to Ghana's foreign affairs ministry, the man is in South Africa legally.


Such conduct undermines the dignity and rights of law-abiding citizens, the ministry said in a statement released on Thursday.


Ghana's High Commission in South Africa has shared a video of top envoy Benjamin Quashie meeting the man.


The situation is dire, we understand, [but] let's continue being law-abiding [and] respect the rules... of engagement as migrant citizens in this country, Quashie says.


The country's Foreign Affairs Minister Samuel Okudzeto Ablakwa has also spoken to his South African counterpart Ronald Lamola, who promised a full investigation and expressed empathy for the victims.


South Africa's acting Police Minister Firoz Cachalia also condemned the acts, saying that no individual or group has the authority to take the law into their own hands, irrespective of grievances or frustrations.


South Africa is home to about 2.4 million migrants, just less than 4% of the population, according to official figures. However, many more are thought to be in the country unofficially.


Most come from neighbouring countries such as Lesotho, Zimbabwe and Mozambique, which have a history of providing migrant labour to their wealthy neighbour. A smaller number come from Nigeria.


Vigilante groups like Operation Dudula, which means to force out in the Zulu language, and March on March claim South Africa is overrun with migrants and blame them for many of the country's social problems, especially unemployment and drug abuse.


They have held demonstrations in major cities which have sometimes turned violent and resulted in attacks on foreign-owned shops.


Earlier this week, March on March led a protest in the port city of Durban and in one clip shared online, a few participants are seen viciously attacking a man they believe is an illegal foreigner.