 -- A family of five from Afghanistan, detained by immigration officials in Los Angeles for unknown reasons since last Thursday, was released and reunited shortly before a court hearing on Monday.

Attorneys representing the father, mother, and three young children – ages 6 years, 7 years, and 8 months – told ABC News the government has yet to disclose why they were held.

Publicly, Immigration and Customs Enforcement officials refuse to talk about the case.

All five family members held special immigration visas, or SIVs, which are set aside for individuals who have worked for the U.S. government in Afghanistan or Iraq and could be harmed in their home country because of their service for the U.S. government.

Attorneys said obtaining a SIV takes a substantial amount of time and vetting before arriving in the United States.

The father, known in court documents as John Doe, worked for the U.S. government in Afghanistan and the entire family was extensively vetted, their attorneys said.

“This really shows this detention was unjustified from its inception,” said Attorney Talia Inlender after the hearing.

Inlender told ABC News that the family was held for almost two days without any communication and without access to attorneys after arriving at LAX. Then the family was separated. She said the father was held at a detention center in Orange, California, while the mother and three children were held in downtown Los Angeles.

On Saturday, the International Refugee Project filed a petition in federal court and attorneys were then allowed to meet with the family. Inlender said that’s when they learned the mother and children were possibly going to be moved to a detention center in Texas.

A request for an emergency restraining order was then filed and immediately approved by a federal judge to keep the family in southern California.

In court on Monday, after the family got back its passports and visas, attorneys asked the judge to rule that the family is in the country legally. But the government argued special immigration visas allow the family to enter but that the visas don’t mean the family members can stay. Homeland Security will now be allowed to interview the family in Seattle to determine if they can remain in the U.S.

“There has been a lot of confusion,” said Inlender. “There’s a lack of transparency. That’s what this case is about at its heart. A lack of access to counsel. A lack of access to information.”

Under the judge’s order, Homeland Security cannot detain or deport the family without 72 hours notice to attorneys.

KABC-TV contributed to this report.