Billal returned home from school Dec. 10 to find his caseworker in his bedroom, packing his stuff.

"She was like, 'Hurry up,'" he says. "I was just shocked."

The 17-year-old Somali refugee had arrived in the United States in August, with no family, no paper records, and only $100 hidden in his shoe. But no sooner had Billal arrived in Gresham than his long solo journey to the U.S.—one that took him across three continents—came to a screeching halt.

He had been accused of lying about his age when he entered the U.S., gaining special protections available only to children.

The evidence against him? His dental records.

Billal was whisked to a federal detention center, where he spent two months away from his Portland-area high school, friends and his Gresham foster mom.

"I can't even describe it," Billal says. "The lights were on 24 hours and there were no windows to see if it was day or night."

A federal judge eventually sided with Billal, invalidating the findings of a Texas dentist, but Billal's future remains uncertain as he awaits a ruling on his request for a special juvenile green card.

There's never been an easy time to be a Muslim refugee in America. That was true even before Republican presidential nominee Donald Trump urged closing the borders to all Muslim immigrants, and before last weekend, when a nation already on edge awoke to horrifying news from Orlando, Fla., where a U.S.-born son of Afghan immigrants massacred 49 people at a gay dance club. The Portland refugee service agency that helps Billal is so concerned about drawing unwanted attention, it refused to be named in this story.

At a time of heightened security, Billal's case illustrates the no-man's land faced by immigrants who arrive here with imperfect or no documents. Their purchase on American soil is tenuous: Many, like Billal, have little more than their own story to offer as evidence they qualify for refuge.

At the same time, immigration officials face a difficult landscape: Under competing political pressures, they must balance the rule of law with the humanitarian impulse to settle people from war-torn countries.

But in Billal's case, his lawyers say, the deck was stacked against him because U.S. officials were using junk science that their own federal agencies had rejected seven years ago to build a case against him.

"It's frustrating because there are laws in place, and they were overlooked," says Denisse Guadarrama, Billal's pro bono attorney in Portland. "It scares me to think this might happen to another child. He's not the first or the last kid to arrive without documents."

Journey to the U.S.

Billal's story is a familiar one in Oregon, where last year 122 unaccompanied refugee children settled. WW is using only his first name.

His Sufi Muslim father was murdered when Billal was a young child, by someone believed to be with al-Shabaab, the Somali terrorist organization. Fearing for her son's safety, Billal's mother sent him to Kenya. He then fled to live with an uncle in South Africa.

Billal never had a birth certificate—a common occurrence in Somalia—but his mother told him that he was born in May 1998. He lost touch with her years ago.

In 2014, when Billal was 16, he says South Africa was deporting Somalis and he feared being sent back. Last year, he traveled to Brazil, where he began a monthslong journey by bus and airplane through South and Central America, with the United States as his hoped-for final destination.

In Mexico, he teamed with other young people and eventually made it close to the U.S. border, where he hailed a taxi to take him as close as possible. The driver at first said the ride would cost $30. A few minutes into the ride, he demanded $50. Then, pulling a gun, he robbed Billal of all the remaining money in his pockets. "I just gave it to him," he says.

One U.S. agency, the Office of Refugee Resettlement, welcomed Billal as a minor after he crossed into Brownsville, Texas, then ushered him to a youth shelter in Chicago. He had no documentation of his age, but said he was 17.

The rules for unaccompanied minors are different from those regulating adults entering the country. Children are sent to shelters and some are allowed to go to school while the government processes their cases. Adults typically go to detention centers, even if there's a chance of gaining asylum.

In Illinois, Billal was informed of his rights and told he could go to school if he moved to Portland—a destination city for unaccompanied minors for at least the past few years. He arrived in Oregon on Oct. 28.

From the start, the country that welcomed him tried to get rid of him. The Department of Homeland Security initiated deportation proceedings against him. Part of that investigation: requiring him to make two visits to the dentist to take X-rays that federal officials thought might prove Billal was an adult.

On Dec. 10, a caseworker delivered a message to Billal's foster home. "Billal's dental tests have come back, and he's a grown man," the caseworker said.

U.S. officials had sent Billal's Portland X-rays to a San Antonio forensic odontologist, who ruled that Billal's third molar development meant he was "20.40 years plus or minus 3.30 years," meaning he could in fact be 17 but was more than likely over 18.

The Texas dentist's report concluded there was a 92.55 percent chance that Billal was over 18, throwing him into the more difficult position of pleading his case as an adult. Billal was sent to the Northwest Detention Center in Tacoma, Wash., an adult immigration prison.

Discredited exams

In sending him to the center, federal authorities had relied solely on the dental X-rays to determine he was over 18—a practice that runs counter to the federal government's own guidelines on radiography. The guidelines say the government must have reasonable suspicion to order the tests. Also, the X-rays have to be used in conjunction with other measures to determine a person's age.

"Radiographs of a person's bones or teeth," a 2009 report from the DHS's Office of Inspector General reads, "cannot produce a specific age due to a range of factors affecting an individual's growth. These include normal biological variation, as well as cultural and ethnic differences."

The same report estimated that immigration officials requested at least one radiograph a day until the practice was debunked.

Guadarrama, Billal's Portland immigration attorney, says the government had no reason to suspect Billal lied about his age, even if he had motivation to do so. It also failed to use any other methods for determining his age.

DHS released Billal two months later, on Feb. 4, 2016. On April 29, a federal judge ruled the government had erred in using the X-rays to determine his age. A lawyer for the U.S. Department of Justice declined to comment.

Billal's case is unusual beyond the fact federal authorities broke their own rules. It's also rare because Billal had attorneys.

There's no public defender system for asylum seekers—whether they're adults or children. Billal's foster mother succeeded in finding him pro bono attorneys, including in Washington.

"No matter your views on immigration policy," says Tim Warden-Hertz, one of Billal's Washington attorneys with the Northwest Immigrant Rights Project, "the thought of a child being forced to try to make a case for why they shouldn't be sent back into danger should trouble you."