Over 100 migrants and refugees held captive by human traffickers were shot at while escaping from a clandestine prison in northwestern Libya and there were numerous deaths and injuries, Doctors Without Borders said Friday.

The international medical organization, also known as Medicins Sans Frontiers, said many people in the town of Bani Walid including members of security forces, hospital and municipal workers, and elders tried to protect the escapees as they were chased by their captors and armed men attempting to recapture them.

MSF said survivors of Wednesday night's escape reported that at least 15 people were killed and up to 40 people, mostly women, were left behind.

It said MSF staff helped treat 25 injured people at Bani Walid General Hospital including seven with severe gunshot wounds and multiple fractures.

The organization said the survivors are mostly teenagers from Eritrea, Ethiopia and Somalia seeking asylum in Europe.

Some of the traumatized survivors told MSF staff that they had been held captive for up to three years, the group said. Many had visible scars, electric burn marks, and old, infected wounds, illustrating the ordeal they had suffered, it said.

Libya plunged into chaos following a 2011 uprising that toppled and later killed longtime dictator Moammar Gadhafi. Since 2014, the country has been split between rival governments and parliaments based in the western and eastern regions, each backed by different militias and tribes.

A U.N.-brokered deal in December 2015 to create a unity government failed, but efforts are under way to try to hold elections this year.

MSF said the escape and shootings are the latest example of "the ongoing horrors" suffered by many migrants and refugees fleeing poverty and conflicts in Africa and the Middle East and transiting through Libya seeking a better life in Europe.

"Kidnapping for ransom remains a thriving business, boosted by European Union-sponsored policies aimed at criminalizing migrants and refugees and preventing them from reaching European shores at all cost," MSF said.

The organization said it has been working for about a year in the Bani Walid region, where migrants reportedly face widespread kidnapping, torture and extortion. But MSF said it has no access to the clandestine prisons in the area.

It said the survivors of Wednesday night's escape, under the supervision of local Bani Walid security forces, were transferred to a security facility in Bani Walid, and on Thursday they were moved again to detention centers in the capital Tripoli.

MSF said its medical teams in Tripoli are carrying out medical consultations and 14 severely wounded patients have been referred for hospital care.

"All necessary measures must be taken to ensure patients can access the required treatment and to protect these extremely vulnerable people from further harm after surviving such atrocities," said Christophe Biteau, the head of MSF's Libya mission. "Arbitrary detention cannot be a solution. They are in urgent need of protection and assistance."