Illegal immigrants at a Libyan detention center in June 17
Lagos, Nigeria CNN  — 

More than 200 Nigerian migrants stranded in Libya have been returned to their home country, Nigerian officials said.

The 242 migrants landed at Lagos airport on a Libyan Airlines flight at around 9:00 pm local time (3:00pm ET) on Tuesday. Among them were women carrying children and at least one man in a wheelchair.

Nigerian authorities say they worked on returning the migrants from Libya in collaboration with the International Organization for Migration (IOM).

Some of the 242 men and women who returned had been in Libyan detention camps while others willingly approached the Nigerian embassy in Libya to return home because of hardship there, authorities said.

Abike Dabiri, senior special adviser on foreign and diaspora affairs to Nigerian President Muhammadu Buhari, said the government there had been working with the IOM, the Nigerian National Commission for Refugees, Migrants and Internally Displaced Persons (NCFRMI) and other local agencies to bring Nigerians back home.

Dabiri told CNN that around 5,000 Nigerians have come back from Libya in the past year.

“The President has said any Nigerian who wants to come back should be brought back, so IOM has been helping out,” Dabiri said.

The NCFRMI said it has been processing on average between eight and 10 flights a month of Nigerians returning from Libya.

The migrant crisis in Libya is once again receiving international attention following recent reporting by CNN that revealed African migrants being sold as slaves in the capital, Tripoli, and elsewhere.

“For people to cross the Sahara desert and Mediterranean through shanty boats … we will try and keep them at home. But anybody who died in the desert and Mediterranean without documents; to prove that he is a Nigerian, there is absolutely nothing we can do,” President Buhari said at an African Union-European Union summit on Wednesday.

Reacting to recent CNN footage on the sale of Africans in Libya, the Nigerian leader said it was appalling that “some Nigerians (in the footage) were being sold like goats for a few dollars in Libya.”

Related: Slavery on agenda as Merkel, Macron meet African leaders

09 cnn libya detention center
Libya's slaves: 'I was sold'
03:15 - Source: CNN

There were poignant scenes in the former Nigerian capital on Tuesday as the men and women touched down at Lagos Murtala Muhammad airport. One man, visibly moved, knelt down on the tarmac and made the sign of the cross as he got off the plane.

Nikki Laoye, an ambassador for NCFRMI, who filmed the arrivals and posted them on her Instagram page, told CNN: “It was quite emotional seeing this. We heard about their ordeal in the desert, some of them were praying to die. No water to drink, thrown into jail and finally given the option to go back to their country.”

“Many of them had traveled illegally through the desert trying to reach Italy via Libya before finding themselves in tight situations, thrown into jail for illegal entry or falling into the hands of wrong people and being sold into slavery and prostitution.”

Related: Rwanda offers refuge to enslaved migrants

Laoye said the new arrivals would be profiled and registered by the Nigerian authorities. Some of them were taken to a shelter run by the NCFRMI in Lagos, where they can remain for up to 90 days.

She added that officials from Edo State, where a large number of the migrants came from, were also at the airport to take them back to the state.