McALLEN, Tex. — Jose Antonio Vargas, who has chronicled in minute detail the twists and turns of his life as a Filipino living illegally for years in the United States, was detained by the Border Patrol for most of the day on Tuesday and then released with a notice to appear before an immigration judge.

The detention of Mr. Vargas, probably the most high-profile leader of the immigrant rights movement, posed an awkward dilemma for the Obama administration. The surge of Central Americans, including many children, crossing the border illegally — saying they are fleeing criminal violence at home — has made all decisions about immigration politically fraught, and administration officials were keenly aware that the backdrop to their decision to release Mr. Vargas was a border where thousands of migrants are being held.

Mr. Vargas was detained at a Border Patrol checkpoint in the airport of this city in the Rio Grande Valley before he was to board a flight to Houston, on his way to Los Angeles. In a terse statement, Department of Homeland Security officials said they had released Mr. Vargas because he had no prior immigration or criminal record. They said their focus was on deporting immigrants who posed security threats.