(CNN) -

Jose Antonio Vargas trumpeted that he was an undocumented immigrant for years. But authorities never apprehended him.

Until now.

On Tuesday, U.S. Border Patrol agents detained the Pulitzer Prize-winning journalist-turned-activist in McAllen, Texas, after he told them he was in the country illegally, officials said.

He was released on his own recognizance with a notice to appear before an immigration judge, the Department of Homeland Security said in a statement.

Vargas was detained Tuesday morning at the McAllen airport while trying to pass through security en route to Los Angeles, said Ryan Eller, campaign director for Define American, a group Vargas founded in 2011.

Vargas became an outspoken advocate pushing for an overhaul of the nation's immigration laws in 2011, when he revealed he was undocumented in a column for The New York Times Magazine.

Recently, he detailed his life story in "Documented," a film about the U.S. immigration debate that he wrote and directed. CNN aired it on June 29.

Vargas said in a statement released by a spokesperson Tuesday evening that he had been released.

"I want to thank everyone who stands by me and the undocumented immigrants of south Texas and across the country," he said. "Our daily lives are filled with fear in simple acts such as getting on an airplane to go home to our family."

Even with his high profile and frequent speaking events about his immigration status, Vargas hadn't found himself in the cross hairs of authorities until his trip this month to the border region to support unaccompanied minors coming from Central America

"Mr. Vargas has not previously been arrested by (Immigrations and Customs Enforcement) nor has the agency ever issued a detainer on him or encountered him," the Department of Homeland Security said Tuesday. "ICE is focused on smart, effective immigration enforcement that prioritizes the agency's resources to promote border security and to identify and remove criminal individuals who pose a threat to public safety and national security."

Tania Chavez, an undocumented youth leader who met with Vargas recently and has accompanied him around the McAllen area, told CNN that he was detained because he did not have proper documentation.

It was a possibility Vargas feared after he arrived in the region.

"Because I don't have any ID besides my Filipino passport, it's going to be hard for me to actually get out of here at some point when I decide to get out of here in the next couple of days," he told CNN on Sunday.

Early Tuesday, Vargas tweeted that he was about to go through security at McAllen-Miller International Airport. Since outing himself as an undocumented immigrant three years ago, he says he has traveled extensively, visiting 40 states.

"I don't know what's going to happen," he tweeted, directing his followers to the Twitter handles for Define American and the University of Texas-Pan American's Minority Affairs Council.

Within minutes, the latter retweeted a photo of Vargas in handcuffs with the caption: "Here's a photo of (Vargas) in handcuffs, because the Border Patrol has nothing more pressing to do apparently."

In Politico last week, Vargas wrote a piece headlined "Trapped on the Border."

The story documents how he went to McAllen to visit a shelter where undocumented immigrant children were being held. He also wanted to share his "story of coming to the United States as an unaccompanied minor from the Philippines," he wrote for Politico.

Once in McAllen, he spoke to Chavez, who expressed concern that he might not make it through the U.S. Customs and Border Protection checkpoints about 45 minutes outside McAllen.