(CNN) Mustapha Sallah was in trouble.
He had hoped to be in Europe by now, pursuing his dreams of studying computer science and making a better life for himself.
Instead, he was sitting in a Libyan detention center, having been detained in Tripoli by the Libyan Coast Guard.
"We were kept in rooms with little ventilation and no toilets. We would sit for days without taking baths. It was like hell," Sallah told CNN.
He added that officers at the detention center often assaulted them by "beating us for the slightest things like refusing to sleep."
It was January 2017, and the 25-year-old Gambian had taken a gamble, risking his life in search of a better one in Europe. But no one had warned him of the dangers ahead.
If and when he got out of the detention center, he vowed to help others make a more informed decision.
Sallah grew up in Serekunda, southwest of The Gambia's capital city, Banjul. He said he worked hard in school to earn a scholarship so that his mother could retire from her job selling vegetables in the market.
In 2016, he thought he'd have that chance when he earned a scholarship to study computer science in Taiwan. "But there was no Taiwan embassy in Gambia, so I had to go to the closest one in Abuja, Nigeria," he explained.
After borrowing money from his sister to travel to Nigeria, he said he spent three months there before his visa application was denied. Three years earlier, then-president of The Gambia, Yahya Jammeh, had cut diplomatic ties with Taiwan for what he called "national strategic interest."
"I didn't know what to do: stay in Nigeria, or go to any other African country. At the end of the day, I got the mind of migrating (to Europe) because I know several people who took the journey and made it there," Sallah explained.
With a population of 2.3 million people, The Gambia is among the smallest countries in Africa. But despite its small size, migration is a fairly common practice and plays a key role in the country's economy.
According to the International Organization for Migration (IOM), overseas remittances for an average of 90,000 Gambians who live abroad make up more than 20% of the country's GDP.
48% of Gambians live in poverty, and many people find themselves looking outside the country for opportunities to improve their lives.
But some people leave the country without proper documentation or without crossing an official border point. Between 2014 and 2018, the IOM estimates more than 35,000 Gambians reached Europe through "irregular means."
"There's a tradition of mobility in Gambia. It's a long history of people using migration as a means of life, and of getting their income. Many of the returnees we have worked with claim they took the journey for economic reasons," Etienne Micallef, the IOM's program manager in The Gambia told CNN.
"They have the perception that if they migrate with the final destination as Europe, they will get a much better income to sustain themselves and their families back home," he added.
But it comes at a high risk. Globally, at least 33,687 migrant deaths and disappearances were recorded between January 2014 and October 2019, according to IOM -- with nearly half occurring on the route between Northern Africa and Italy.
Sallah, who said he wanted an education that would allow him to find a job to support his family, reiterated that no one warned him how incredibly dangerous the journey would be.
After his visa to study in Taiwan was rejected, he said he got on a bus heading north to Agadez, a city in Niger. "I didn't even know the area -- I just kept asking people around what the best or possible way to reach Niger was."
From there, he managed to travel to Libya. "You have to pay smugglers who drive pickup trucks to put you at the back of their trucks to get to Libya and then to Europe. I spent a month with my cousin in Libya before heading in another pickup truck for Tripoli," he told CNN.
His journey to Tripoli was treacherous, he said, telling CNN he was detained and extorted multiple times by armed bandits.
Sallah said he was close to death from starvation and even witnessed a gun battle between armed bandits and smugglers: "The man that was smuggling us told us that if we want to stay in Tripoli, we must get used to gunshots," he said.
But it all came to an abrupt halt in January 2017, when he was arrested by the Libyan Coast Guard in Tripoli.
Libya is a primary transit point along the central Mediterranean route. People who get stuck there are often detained by the Libyan Coast Guard, responsible for patrolling coastal waters to prevent smuggling and trafficking.
Sallah said he was kept in a detention center in Tripoli with migrants from different West African countries for nearly four months under poor conditions.
There are 11 detention centers for migrants run by the U.N.-backed Government of National Accord (GNA) in Libya. Some 2,362 detainees are held at these facilities on any given day, according to the Global Detention Project.
Human Rights Watch (HRW) and Amnesty International have criticized the conditions at these detention centers; both groups signed onto a statement released in April that urged EU member states and institutions to review their policy on migrants and cooperation with Libya.
The policy, the statement says, has allowed for the "arbitrary detention and cruel, inhuman and degrading treatment" of migrants and refugees.
While in detention, Sallah met a fellow Gambian who suggested they set up the non-profit organization Youth Against Irregular Migration (YAIM) to warn others back home about the risks of irregular migration.
"I went around the detention center gathering details of all the Gambians I could find," estimating he registered 171 people to join the organization. "We agreed that if we made it out of there, we would start an association to make people aware of how problematic the journey to Europe is," he said.
In April 2017, as part of its mandate to return and reintegrate migrants stranded or detained in their transit countries, IOM facilitated the return of Sallah and many others within the detention center back to The Gambia.
That same year, IOM received funding from the EU worth 3.9 million euros (about $4.6 million) over the course of three years, to expand its operations in The Gambia.
Since then, according to Micallef, IOM has repatriated more than 5,000 people to the West African nation.
He added that when returnees arrive at the airport or land border, they are met by IOM staff who arrange for temporary shelter, counseling, and medical support for those who need it.
Weeks after returning to The Gambia, Sallah said he met with some members of YAIM who signed up in the detention center.
"We met almost every week after arriving in Gambia," he explained. "It was difficult for us financially at the start but many of us had the support of our families."
He added that even though many of them struggled to make a living at the start and had to pick up menial jobs around town to survive, being around other members gave them a renewed sense of hope.
Being safe at home, he said, was a better option than the dangerous journey to Europe.
"We bonded by sharing our stories with each other as a way to work through the trauma," Sallah said. "We made sure to be there for each other."
Through YAIM, the returnees began campaigns around irregular migration in The Gambia, warning others about the perils of journeying to Europe.
Tombong Kuyateh, a returnee and YAIM member, told CNN that the association visits schools to share experiences with students who may be thinking about migrating.
"We share our personal stories with them. We show them examples of victims who were injured or affected during the journey to prevent them from experiencing the same," he said.
The 27-year-old added that a lot of people listen to them because they have first-hand experience of what it's like to attempt that trip.
By crowdfunding and partnering with local and international groups for support, YAIM is also able to visit small communities across the country for campaigns against irregular migration, Kuyateh said.
Miko Alazas, the IOM communications officer based in The Gambia, told CNN that the organization sometimes partners with returnee associations like YAIM to get people access to the right information, in order to make better migration-related choices.
"We work a lot with returnees because many of them are passionate about sharing their experiences in terms of exploitation and abuse -- so they are at the forefront of a lot of campaigns to raise awareness on irregular migration," he said.
Now 29, Sallah travels around his home country, visiting radio stations and communities to talk about his harrowing experience. He believes in the power of storytelling to educate others about migration.
"I always tell them about the difficulties," he said. "Some people lost their lives on the journey. I was part of those who ended up in detention. Every time you are on that journey, you are close to death."