It only took a moment for US Border Patrol agents to spot a flash of color in a steep-sided canyon, then to identify a man in a black cap lying on a rock.

The man, agents discovered, was from Guatemala and part of a group of undocumented migrants making an illicit crossing of the Rio Grande river which separates Mexico from Texas in the United States.

Left behind when he injured his knee after making it across the river, the man was stranded for three days in a desolate ravine in the San Rosendo Canyon of west Texas until Border Patrol agents found him.

Border patrol agents Arain Carrera and Thaddeus Cleveland approach an injured Guatemalan migrant in a remote canyon of west Texas
Border patrol agents Arain Carrera and Thaddeus Cleveland approach an injured Guatemalan migrant in a remote canyon of west Texas Agence France-Presse / Paul Ratje

Operating in remote and inhospitable terrain miles from anywhere, the green-clad Border Patrol agents are on the frontlines of a wave of Central American migrants heading into the US that has prompted a crackdown by President Donald Trump.

AFP journalists accompanied the Border Patrol for three days in Texas, documenting the routine of the agents tasked with guarding the frontier amid growing controversy over Trump's immigration policy.

"If we were born somewhere else, we would do the same," Thaddeus Cleveland, the agent in charge of the Border Patrol station in Sanderson, Texas, said of the northward-bound migrants he encounters.

US Border Patrol agents in Texas are responsible for hundreds of miles of terrain and use everything from drug-sniffing dogs to cameras in their patrols
US Border Patrol agents in Texas are responsible for hundreds of miles of terrain and use everything from drug-sniffing dogs to cameras in their patrols AFP / Paul Ratje

Border Patrol agents play a complex role along the US-Mexico border, something between a police officer, a bloodhound and a rescuer.

"The agent has to be an athlete," said operations officer Arain Carrera, 35.

Derek Boyle, the agent in charge of the Border Patrol station in Presidio, Texas, walks through tall grass on the US-Mexico border
Derek Boyle, the agent in charge of the Border Patrol station in Presidio, Texas, walks through tall grass on the US-Mexico border Agence France-Presse / Paul Ratje

In Texas's Big Bend sector, agents are responsible for monitoring hundreds of miles of terrain, including 515 miles (830 kilometers) of the Rio Grande river, lined by perilous canyons and arid deserts where operations to track and arrest people can last for days.

Patrols can be on foot, on horseback, or in trucks, and agents have access to night-vision goggles, motion sensors, cameras and dogs trained to detect drugs. Yet making arrests is often more about technique than technology.

"We're looking for footprints, and since there's no dirt, we have to look for kicked-over rocks, for broken brush and things of that nature, that give us a sign that someone has been through this area," Cleveland said, describing the tracking skills agents use.

A Border Patrol vehicle drives at dusk in the Big Bend sector near Ruidosa, Texas
A Border Patrol vehicle drives at dusk in the Big Bend sector near Ruidosa, Texas AFP / Paul Ratje

Their adversaries are the traffickers who guide migrants in exchange for thousands of dollars, and employ scouts to stand on the Mexican side of the Rio Grande and watch the agents' movements.

Last year, the approximately 500 agents in the Big Bend sector detained 1,624 people.

That was just a small segment of the nearly one million undocumented migrants apprehended between October 2018 and the end of September 2019, most of whom were from violence-torn Central American countries like Guatemala, El Salvador and Honduras and aiming to claim asylum in the US.

Trump campaigned on cracking down on illegal migration, and has pressured Mexico into deploying troops along its southern border to stop the migrants.

The measures have paid off: just over 52,000 arrests of undocumented migrants were made in September 2019, down significantly from months prior.

Yet the crackdown has seen US immigration authorities accused of human rights abuses stemming from the Trump administration's now-halted policy of separating migrant children from their parents, along with dire conditions at some Border Patrol stations that were turned into makeshift detention facilities amid last year's surge.

The agents say they aren't just enforcing the law, but also saving lives.

"When we hear people vilifying our agents for the job that they do, it just truly comes down to not knowing the reality," said Matthew Hudak, the Border Patrol chief of the Big Bend sector.

Though traffickers can charge between $5,000 to $10,000 per person to take them across the border, they often show their clients little regard.

"Human smuggling is a costly endeavor because it's all about money and they don't care about the individuals that are crossing," Derek Boyle, commander of the border crossing in the town of Presidio.

A typical day on patrol can turn into "a life-saving situation where we're actually rescuing them out of mountains, rescuing them out of the creeks, rescuing them out of the rivers," he said.

In the case of the Guatemalan migrant discovered by the agents, he was taken to a hospital for an operation on his knee. Just over a week later, he was on the move again, this time in the custody of the US government, which Carrera said would deport him back to Guatemala.