Thanks to confusing citizenship requirements, people can live for decades without knowing their true status.

Sonny’s parents warned him: Authorities could turn him into immigration enforcement at any time. So, growing up in rural California, he cowered at police, avoided applying for jobs, and never drove.

“I thought they could pick me up whenever and send me back,” said Sonny, now 20, who was born in Mexico and crossed the border at age five with his mother and younger brother. “When cops would pull my friends over and I was in the car, if they asked for my ID I’d say I didn’t have it. I didn’t want them to know something was up with my citizenship.”

As Donald Trump campaigned last fall, Sonny entered 12th grade more anxious than ever, internalizing Trump’s promises to purge the nation of undocumented immigrants and to erect a 70-foot-tall cement border wall with Mexico. “I started hearing things like, ‘Mexicans and immigrants are all bad,’” recalled Sonny, who requested his last name not be used to protect his family’s privacy. “It made it harder to imagine staying here, being scared so many people are against you.”

Then one day after school, as Sonny found solace in watching his favorite movie, Dances with Wolves, his father burst into his room with an outrageous proposal.

“He walked in and said I could be a citizen,” said Sonny. “I thought it was going to be another scam.”

He had good reason to distrust the claim. His family had already overpaid a notary to help him apply for DACA, an Obama-era program that provided deportation relief for young undocumented immigrants in two-year increments. In the family’s tiny town outside Davis, California, immigration attorneys were scarce and Sonny knew no other youths—other than his brother—in his position.

“People tell you different stories over here, and they charge you different amounts,” Sonny’s father Jose told me of notaries pledging to help immigrants adjust their legal status. “I went to a notary public who charged us $700 to fill out a two-year application. I decided I needed to get a second opinion.”

Jose’s quest led Sonny and his brother Jose, who had always believed they lived illegally in the States, to a stunning realization: They are, and always have been, US citizens.

An unknown, but significant amount of US residents spend their lives ignorant of the fact they, too, are citizens, due to the complexity of citizenship requirements and a lack of education about those criteria.

“Its very common actually,” said immigration attorney Holly Cooper, co-director of the immigration law clinic at UC Davis, who specializes in citizenship claims and handled the brothers’ case. “It’s a life-changer for so many of our clients who live their lives thinking they're undocumented and then we turn around and tell them, ‘You’re a citizen.’”

Cooper estimated that about 5 percent of the individuals who approach her for immigration help are unwittingly citizens.

“You find a lot of these people in rural communities because of a lack of access to lawyers in rural communities,” she said, noting that even in many “know your rights” presentations for immigrants people skip over explanations about citizenship.

Sonny and Jose had a straightforward case: Their father (also named Jose) was a US citizen who had lived in the US more than ten years before the sons’ birth, making them also automatic citizens, Cooper explained.

Jose was born in Chicago to Mexican immigrant parents and spent his life in the States but visited Mexico regularly, meeting his future wife on one of those trips. He moved briefly to Mexico, where they married and had children, but then returned to the US to work as a forklift operator, and his family soon followed.

If you sort through a somewhat complicated chart at the USCIS website, it’s clear that Sonny and Jose qualify for citizenship. But it’s not intuitive to many that they would. Even highly educated people—including some attorneys—are unclear about the criteria for citizenship, said Cooper.

“I work with public defenders all the time who don't understand this,” she told me. “It’s hard to educate people about because it’s so complicated. It’s a labyrinth of laws.”

The easiest criteria for citizenship is birth in the United States, but people can also be citizens through their parents or grandparents, and the requirements vary depending on what year they were born, since citizenship laws have evolved over time. To prove their citizenship, a qualified individual can either apply for a US passport through the US State Department or for a certificate of citizenship through US Citizenship and Immigration Services—a process that takes months, even years, depending on the complexity of the case and discretion of the government officials.

The boys’ father had significant proof of his US birth and residency, but it still took months for Cooper and her law students to secure their citizenship from the Department of State, she said. The younger son, Jose, now 18, got confirmation of his status by May, while Sonny only just received his confirmation this fall.

“For Jose it was easier but Sonny had a different passport officer who wanted all the documentation for his father’s schooling, his tax returns, birth certificate, marriage certificate,” Cooper said, explaining that the passport office guards against fraud in this way.

The officer also asked for documents of every job the father had worked and every time he had left the country and returned, resulting in a “45-year history of Jose’s life,” said Cooper’s law student Apurva Behal*, who compiled the information.

A US State Department spokesman said the agency receives first-time passport applications from US residents asserting their citizenship on occasion, but could not provide specific statistics. He told me individuals born and living abroad more frequently contact US consulates asserting citizenship claims because they have realized they qualify for citizenship through a parent.

With no central database of US citizens, and a lack of clarity over individual cases, the US federal government has also been known to detain and to deport US citizens.

More than 800 individuals were released from immigrant detention facilities between 2007 and 2015 after they proved they were citizens, according to data obtained by a FOIA request by Northwestern University professor Jacqueline Stevens and analyzed by NPR. Stevens, director of Northwestern’s deportation research clinic, has estimated that thousands more people have been wrongfully detained and deported without having the chance to prove their citizenship. In one recent high-profile case, a citizen named Davino Watson was detained by Immigration and Customs Enforcement for over three years but was denied any compensation for his imprisonment.

A spokesperson for Immigration and Customs Enforcement responded told me that the agency “takes very seriously any and all assertions that an individual in its custody may have a claim to U.S. citizenship.”

“Analyzing US citizenship for individuals born abroad can often be very complex, as it often involves investigating the individual’s birth and immigration history, residency history, immigration status, marital status of the individual’s parents, and the ever-changing body of law that was in place at the time of the individual’s birth,” the spokesperson, Danielle Bennet, said in an emailed statement. “This complexity means that some individuals don't even know they are U.S. citizens until well after they are encountered by ICE.”

Fortunately for Sonny and Jose, their father thought to investigate his sons’ legal status before they had an encounter with immigration enforcement, and before they ever moved out of his house.

“We probably would have moved to Mexico already, because ICE was doing roundups,” the elder Jose told me of the deportation raids enacted under the Trump administration. “It’s changed now: They can do what they want to do and they can study what they want to study.”

For Sonny, who ran daily to his mailbox this fall to check for his passport, the document gave him the hope he lacked for a future in the US.

“The first day I slept with it under my pillow to keep it safe—I didn't want to lose it,” he said of the night in early October. Now Sonny, an understated young man who draws and does martial arts, has begun applying for jobs with his ID, and celebrated his citizenship last month along with his 20th birthday.

“It feels good, I can finally work, travel, and vote,” he told me. “I feel more like this is my home.”

Correction: An earlier version of this story misspelled Apurva Behal's name. VICE regrets the error.