It took a lot of mistakes -- by the victim’s parents, by attorneys and a big one by the U.S. Department of Homeland Security’s Immigration and Customs Enforcement agency.
Add it all up and you have an American citizen facing deportation to Mexico.
Ricardo Salazar on Wednesday walked out of the West County Detention Facility in Richmond. Despite being free for the first time in four months, he is broken hearted after missing his mother’s funeral in June.
"It was hard because I didn’t get to say goodbye to her," he said.
In a tragic irony, Salazar's trouble began in May when he left his home in south Texas to travel to Mexico to buy less expensive medicines for his ailing mother.
But when he tried to return home, Salazar, who was born in Mexico but whose mother was a U.S. citizen, was only carrying his green card.
His mother made mistake number one when the family reentered the United States shortly after he was born.
"What they should've done is apply for him as a citizen," Salazar's attorney Joseph LaCome said. "What they did is apply for the entire family as lawful permanent residents."
Customs officials saw an arrest record with the most recent entry six years ago. That would not have been a problem for a U.S. citizen but posed a hurdle to Salazar because he was carrying just his green card.
Salazar told any ICE agent who would listen that he is an American citizen, but nobody listened.
"I keep telling them, 'My mom's a U.S. citizen, she was born in Texas, in Corpus Christi,'" Salazar said. "They ignored me."
That was mistake number two.
"They are supposed to interview the person, record it and take sworn testimony," LaCome said.
Meanwhile, the third mistake was made by Brownsville-area attorneys who conjured up a defense based on Salazar's green card status.
But since jails on the U.S.-Mexico border are overcrowded, Salazar was bussed to Richmond.
"I was able to figure it out in 15 minutes," said LaCome, adding that he contacted Salazar's family and got a hold of documents that proved his citizenship and helped him go home.
"The first thing I have to go see is my mom's grave," said Salazar, adding that he is considering filing a lawsuit.
In an email to NBC Bay Area, ICE officials said they take "very seriously claims of U.S. citizens being improperly detained" and have "stringent safeguards to protect against the possibility that a citizen is detained or removed."