(CNN) A UN expert on the human rights of migrants has urged a "thorough" investigation into the death of a 7-year-old girl in US Customs and Border Protection custody,

Felipe González Morales, the UN Special Rapporteur on the human rights of migrants, said US authorities "must ensure that an in-depth, independent investigation" is conducted into the death of Jakelin Caal Maquin.

"Access to justice for her relatives should be granted, including but not limited to having legal representation in the proceedings in a language they understand well," he said, according to a UN news release

"Redress to her family should be provided and if any officials are found responsible they should be held accountable," the news release said. "The government should also address failings within the immigration system, and specifically within the US Customs and Border Patrol agency, to prevent similar situations."

A law professor in Chile, González Morales stressed that the United States should stop detaining children "based on their migratory status."

Read More