(CNN) Disturbing video clips shared on social media by their desperate families have revealed the ordeal of Sudanese migrants kidnapped and tortured for ransom in Libya.

As one clip plays, viewers can hear the slap of the whip, the whimpering as each man is forced to turn his head to the camera and beg his family to send money.

The men's relatives say they disseminated these videos on social media in a bid to raise awareness -- and within a matter of days Libyan special forces had traced where the men were held, according to Libya's UN-backed unity government.

On Wednesday, they raided a location in the city of Sirte, where they arrested four men and freed eight Sudanese abductees, according to a statement from Libya's Special Deterrence Forces, which operate under Libya's Ministry of Interior.

The Special Deterrence Forces statement refers to videos circulating on social media of the torture. It describes "the horrific images committed by some criminals deprived of humanity in torturing laborers and burning them with fire, videotaping them to send it to their families in an attempt to pressure and blackmail them with ransom in return for their freedoms."

One of the video clips shows at least five Sudanese men lying on the ground. They are asked by two men, off camera, to show their faces and can be heard calling on family members by name and begging them to transfer the money so they can be released.

JUST WATCHED Sudanese migrants tortured in Libya for ransom Replay More Videos ... MUST WATCH Sudanese migrants tortured in Libya for ransom 02:25

In a second clip filmed at the same time and location, the five Sudanese men are lying on their front as they are being beaten. Their backs are covered in scars, possibly fresh flesh wounds. The camera and the beatings move from one man to the next as they are forced to address their families or whomever the video will be sent to. As they squirm in pain, the first man says "transfer the money," the second says "sell the house," the third "tell them to sell the house," and the fifth says "send the money."

A third video shows another Sudanese man, who writhes naked on the ground as a man off camera tortures him by dripping hot oil and fire on his back. Another man, who's masked, is seen pointing a gun at the victim.

Family members of those depicted in the videos confirmed to CNN that they had been sent the videos in an attempt to extort ransom. They asked not to be identified due to ongoing fears for both their own safety and for the safety of those depicted in the video.

"The release of the videos on social media was part of a concerted attempt to help raise funds to pay the ransom," they said.

JUST WATCHED Migrants being sold as slaves Replay More Videos ... MUST WATCH Migrants being sold as slaves 06:49

In a statement sent to CNN on Thursday, the Libyan Ministry of Foreign Affairs said it "renews its condemnation and in the strongest terms of this criminal act and stresses the continued efforts of the Government of National Reconciliation to achieve security and stability for its citizens and foreign residents on Libyan territory of various nationalities."

Sudan's Foreign Ministry summoned Libya's charge d'affaires in Khartoum, Ali Muftah al-Mahrouq, on Tuesday to "express the ministry's rejection to the inhumane and immoral treatment of the Sudanese citizens," the official Sudanese news agency SUNA reported.

Al-Mahrouq expressed "his sorrow and apologized," saying criminal gangs operating in areas out of the government's control were responsible for this "shameful act," according to SUNA.

On Monday, African Union Commissioner of Social Affairs Amira Al-Fadil said that videos of Sudanese men being tortured in Libya "are recent and an investigation has been opened," SUNA reported.

CNN cannot determine when the videos were filmed.

CNN was tagged by family members of the victims in the original social media dissemination of the videos in a bid to raise the profile of the torture inflicted on these victims.

An ongoing CNN investigation into the money trails linking the criminal gangs in Libya and the families of their victims has unearthed evidence of a global network. In Sudan, several families of former victims told CNN as much as $4,500 per hostage had been demanded of them, payable to agents of the gangs and even directly into bank accounts in the Sudanese capital, Khartoum.

CNN was shown Western Union money transfer receipts with confirmation that the money had been received in a number of countries including Bangladesh and Niger.

An agent of the trafficking gangs is able to pick up the money at the location and transfer it again and again to disguise its origins. The money is then physically carried into Libya, circumventing the sanctions placed on the country.

Western Union told CNN it took extensive steps to monitor and prevent potentially illegal activity.

"Western Union vigorously condemns all illegal activities facilitating the financing of crime, and we assign a priority to initiatives to detect and deter the misuse of our services," it said. "Criminals threaten the individuals, families and businesses we serve and the foundation of our business."

Migrant route through Libya

Libya has long struggled to cope with an influx of migrants from sub-Saharan Africa, many of whom hope to transit in Libya before traveling to Europe with the help of smugglers. For years, migrants crossing the Mediterranean have brought with them stories of beatings, kidnapping and enslavement.

Rights group Amnesty International last month accused European governments of being complicit in the torture and abuse of migrants and refugees in Libya by supporting efforts by the Libyan coastguard to prevent migrants crossing the Mediterranean and return them to camps in Libya.

Amnesty called on the EU to end what it called a "policy of containment" and instead establish "pathways" to bring the migrants and refugees to Europe safely.

A European Commission spokesman told CNN that the EU institutions were "working to save lives, pure and simple."

The EU has funded the International Organization for Migration to help 15,000 people stuck in Libya return home and plans to repatriate 15,000 more. It has also settled 40,000 refugees who have crossed into Europe from Libya and plans to take 50,000 more in 2019, the commission said.