March 5 (Reuters) - U.S. agents unlawfully detained an Afghan family of five at Los Angeles International Airport and have been holding them for several days in California, according to legal papers filed in federal court in California by human rights lawyers.

The father, mother and three small children were granted Special Immigrant Visas because family members risked their lives to defend the U.S. government overseas, said the filing from lawyers with the International Refugee Assistance Project, a legal aid group for refugees and displaced persons.

“Yet despite this record of service on behalf of our country, CBP has detained this brave family and denied them access to counsel,” said the petition filed on Saturday with the U.S. District Court Central District of California, referring to Customs and Border Protection.

CBP declined to comment and Immigration and Customs Enforcement was not immediately available for comment.

Immigrant advocates are increasingly concerned about tougher scrutiny of visitors, even those with the proper documentation and visas, as part of President Donald Trump’s crackdown on illegal immigration on national security grounds.

“The betrayal of this family by the U.S. government shocks the conscience,” the petition said, adding the father, who was not named, was employed by the U.S. government in Afghanistan.

The lawsuit did not state the nature of his employment but the visas are often granted after careful vetting of people who serve in jobs such as translators for the U.S. military.

The wife and children, aged 7 years, 6 years, and 8 months, were also not named. The family arrived in the United States on Thursday and was almost immediately taken into custody by CBP agents at the Los Angeles airport, the filing said.

Trump issued a directive in January suspending travel to the United States by citizens of seven mostly Muslim countries. Afghanistan was not on the list and a federal court suspended the order.

The Jan. 27 order caused chaos at airports around the world in the following days as visa holders heading to the United States were pulled off planes or turned around on arrival at U.S. airports.

More than two dozen lawsuits were filed in U.S. courts against the initial travel ban, which temporarily barred travelers from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen.

(Reporting by Jon Herskovitz in Austin, Texas; Editing by Peter Cooney)