Image copyright Getty Images Image caption Jose Antonio Vargas arrived in the US from the Philippines in 1993 aged 12

A prominent activist and undocumented immigrant has been released by border agents in Texas after hours in custody.

Pulitzer Prize-winning journalist Jose Antonio Vargas, who has lived in the US illegally since he was a child, was held at McAllen Airport on Tuesday.

The Philippines-born immigration activist, 33, said later in a statement on Facebook that he had been released.

He had been near the border attending a vigil for unaccompanied immigrant children attempting to enter the US.

The growing number of adults and young people arriving in the US from Central America has become a humanitarian and political crisis in recent weeks.

Mr Vargas, a former Washington Post reporter, revealed himself as an undocumented immigrant in a 2011 New York Times Magazine article.

"As an unaccompanied child migrant myself, I came to McAllen, Texas, to shed a light on children who parts of America and many in the news media are actively turning their backs on," he said after his release.

"But what I saw was the generosity of the American people, documented and undocumented, in the Rio Grande Valley."

It is not yet clear whether Mr Vargas has been issued with some kind of court notice.

He was stopped at McAllen Airport which, although in the US, serves as an interior checkpoint for US Customs and Border Protection.

A photo showing Mr Vargas being handcuffed by two US Border Patrol agents sparked anger.

Image copyright AP Image caption Many migrants head to the US-Mexico border by train

"We stand in solidarity with Jose Antonio and demand for his immediate release, but we must remember that there are thousands of people along the border that live with this same fear every day," said Cristina Jimenez, managing director of United We Dream, an immigrant activist group who helped organise his visit.

New York Mayor Bill de Blasio had also called for his release, saying that this "shows how our immigrant enforcement agencies are failing to use their discretion and detaining long-time immigrants who do not pose a threat to our security".

Image copyright AP Image caption Tensions have been running high at locations earmarked to take some of the new arrivals

Image copyright AP Image caption Obama has called on Congress to increase funding to address what he called a crisis at the border

The US has seen a sharp increase in the number of children trying to cross illegally into the US.

From October 2013 to 15 June, 52,000 unaccompanied children arrived on the US border with Mexico, according to the US homeland security department.

The influx has become a political lightning rod and has led US President Barack Obama to label it a "humanitarian crisis".

Mr Vargas - part of a team awarded the Pulitzer Prize for reporting on the 2007 mass shooting at Virginia Tech university - has attempted to draw attention to the plight of child immigrants over the years.

The activist, who hails from the Philippines, was sent to live in California in 1993 at age 12 and struggled to gain US citizenship.

"I convinced myself that if I worked enough, if I achieved enough, I would be rewarded with citizenship. I felt I could earn it," he wrote in the New York Times Magazine.

"I've tried. Over the past 14 years, I've graduated from high school and college and built a career as a journalist," he added. "I've created a good life. I've lived the American dream.

"But I am still an undocumented immigrant."