The United Nations monitor who acts as global watchdog on the treatment of migrants is calling for an in-depth independent investigation into what happened to Jakelin Caal Maquin, a seven-year-old Guatemalan girl who died in the custody of the US government.

Felipe González Morales, the UN’s special rapporteur on the human rights of migrants, has sent a formal complaint to US secretary of state Mike Pompeo, via officials in Geneva, in which he sounds the international alarm about the death. Jakelin died on 8 December, less than 48 hours after she was detained by Customs and Border Protection (CBP) at a remote border crossing in New Mexico.

González is demanding a full independent inquiry into the tragedy, to be led by judges and lawyers and in which the girl’s family is legally represented and given access to language translation. As a measure to prevent more deaths, he also calls for an immediate end to detention of migrant children in the US and urges the Trump administration to address “failings within the immigration system to prevent similar situations”.

In an interview with the Guardian, González said numerous international human rights bodies had repeatedly warned that children should not be kept in detention based on their migrant status.

“Detention of children has such a severe impact on them that we have repeatedly warned of the risks,” he said.

The UN monitor stressed that the Trump administration was bound by international laws it could not shirk.

“When a person, especially a child, is in the custody of a state, that state has to ensure their rights. States have an obligation to care for migrants who arrive at the border, they cannot treat them as animals in inhuman conditions. I’m not saying this happened in this case, but the US has a duty in this regard.”

The intervention of the main international watchdog on the human rights of migrants adds to pressure for the Trump administration to go beyond the routine inquiry that is being carried out by the Department of Homeland Security’s Office of the Inspector General. Lawyers for the girl’s family as well as several members of Congress have decried such an internal investigation as a grossly inadequate form of self-policing.

“Something as serious as the death of this girl should not be left to administrative authorities,” González told the Guardian. “I want to make sure that judges and public attorneys carry out the investigation fully in an independent manner without any pressure from the immigration authorities. An internal CBP inquiry would not be satisfactory.”

Facebook Twitter Pinterest Villagers in tears in San Antonio Secortez, where Jakelin grew up. Photograph: Oliver de Ros/AP

The tragic last hours of Jakelin have become a lightning rod for unease about increasingly hardline policies being pursued by Trump at the southern border. After a perilous journey of more than 2,000 miles from her indigenous community in Guatemala, she and her father, Nery Gilberto Caal, arrived at the US border on 6 December.

They were among 163 migrants detained by CBP agents at Antelope Wells in New Mexico, including 50 unaccompanied children. Jakelin was reported sick as she and her father were being transported in a bus to the Lordsburg border patrol station, from where she was helicoptered to a hospital in El Paso, Texas. She died in the early hours of 8 December.

Many key facts have been disputed. CBP claims it properly cared for the girl, providing her and her father with water and food and doing everything they could to save Jakelin’s life when her sickness became known.

Her father has insisted no water was offered to them. He has said his daughter was in good health when they entered US detention.

On Monday, a white coffin carrying Jakelin’s ended its somber journey home to San Antonio Secortez, a dusty hamlet 220 miles north of the capital. Relatives had set up a small wooden altar overflowing with flowers, photographs of the child and a sign that read “We miss you.”

When a person, especially a child, is in the custody of a state, that state has to ensure their rights Felipe González Morales

González told the Guardian he wanted the investigation to determine whether the Guatemalan family had been placed in “hieleras” – holding cells at the border patrol stations where for years migrants have complained they are kept in freezing temperatures with only aluminum blankets for heat.

“There have been many complaints about the conditions of migrants in hieleras – they are places that pose a risk to the health of the persons detained,” González said.

Earlier this week it was revealed that a five-month-old infant had been hospitalized in North Carolina with pneumonia. Her migrant mother blamed the freezing conditions in CBP custody.

Coming as it does on Christmas Eve, the intervention of the UN monitor falls at an awkward time for an administration that has proved sensitive to accusations it shows heartlessness towards migrant children. Trump backed down in June from his controversial policy of separating families, after massive criticism at home and around the world.

González said using the detention of very young children as a form of deterrence against migration was not only “very problematic” it was also a violation of international law.

Call it a miracle: how strangers got two caravan families across the border Read more

“You are invading a person’s rights as a way of securing public policy, and that is not reasonable,” he said.

He added that he would be keeping a close eye on new tactics being pursued by federal authorities, ostensibly to deter migrants attempting to cross into the US. CBP appears to be pursuing a deliberate policy of dragging its feet over the processing of asylum applications.

This week it was also announced that in future asylum seekers will be returned to Mexico as they await decisions about their claims.

González lamented the fact that so far his requests for access to the US border with Mexico had not received the blessing of the Trump administration. The UN monitor has made two formal requests to be allowed to make an official fact-finding visit to detention centers and border patrol stations. There has been no reply from the state department.