TIJUANA, Mexico>> Albert Rivera knows well how dangerous Mexico can be: He sometimes wears a bulletproof vest around the compound of bright yellow buildings that he built into one of the nation’s largest migrant shelters.

His phone stores more evidence in the form of stomach-churning videos that gangs sent migrants to warn of consequences for disobeying demands. The images include severed limbs being thrown in a pile, a decapitated head getting tossed in a barrel of steaming liquid and a woman squirming while her head is sawed off.

But across town from the Agape Mision Mundial shelter, many migrants are grateful for a chance to settle here. That’s where Mexico’s asylum office greets foreigners who consider the border city of Tijuana a relatively safe place to live with an abundance of jobs.

The jarring contrast speaks to Mexico’s conflicted status. It is a country where violence and inequality chase many people to seek a better life in the United States. For others it offers a measure of peace and prosperity beyond what’s available in their homelands.

A safe, robust asylum system in Mexico eases pressure on the United States, which is looking more to other governments to manage migration. A U.S. Supreme Court ruling issued Tuesday kept pandemic-era limits on asylum in place for now.

Mexico was the world’s third-most-popular destination for asylum seekers in 2021 after the United States and Germany, according to the United Nations. It is on pace to end the year just below an all-time high of 131,400 asylum claims in 2021, led by Hondurans, Cubans and Haitians.

Juan Pablo Sanchez, 24, followed others who left Colombia in the past two years after struggling financially as an organizer of cultural events.

For him, Tijuana is a better option than the United States. He pays $250 a month in rent, far less than a friend who pays $1,800 for a similar place in Illinois. Pay is lower in Mexico, but jobs are plentiful, including at export-driven manufacturing plants.

Lower expenses mean more money to send his wife and stepson in Pereira, a city in a coffee-growing region of the Andean foothills.

“The fruit (of my work) is seen in Colombia,” he said after riding a motorcycle he uses for a messenger job to the Tijuana asylum office. “Making a living in the United States is precarious.”

Mexico granted 61% of asylum requests from January through November, including at least 90% approvals for Hondurans and Venezuelans. Cubans and Haitians are far less successful.

The U.S. grant rate was 46% in the fiscal year that ended Sept. 30.

That figure is below Mexico’s rate but up from 27% two years ago, when the administration of former U.S. President Donald Trump sharply limited relief for victims of gang and domestic violence, according to data from Syracuse University’s Transactional Records Access Clearinghouse.

Mexico abides by the Cartagena Declaration, which promises a safe haven to anyone threatened by “generalized violence, foreign aggression, internal conflicts, massive violation of human rights or other circumstances which have seriously disturbed public order.” The U.S. observes a narrower definition that requires a person to have been individually targeted for limited reasons, as spelled out in the U.N. Refugee Convention.

Mexico’s relatively generous criteria carry little weight in Rivera’s shelter, where 500 guests seldom venture far beyond a neighborhood store.

The Puerto Rican pastor grew up in Los Angeles and ran a home in Tijuana for recovering drug addicts before converting it to a migrant shelter in 2018.

He says gunmen once burst inside looking for a woman who was hiding elsewhere.