In an unusual gesture that could partly reverse a more familiar northward odyssey toward Europe, Rwanda offered on Thursday to house or help repatriate some of the thousands of African migrants being held in Libya and reportedly auctioned there as slaves.

A statement from the country’s Foreign Ministry said Rwanda was “horrified” that “African men women and children who were on the road to exile have been held and turned into slaves.”

“Given Rwanda’s political philosophy and our own history, we cannot remain silent when human beings are being mistreated and auctioned off like cattle,” the statement said. The evocation of Rwanda’s history apparently referred to bloodletting in 1994 when more than 800,000 people perished in an ethnically driven genocide.

“We may not be able to welcome everyone but our door is wide open,” the Foreign Ministry said.

The statement did not say how many people might be taken in by Rwanda, a small, landlocked country of 12 million in east-central Africa that ranks as one of the continent’s most densely populated.