Image copyright Getty Images Image caption Migrants have tried to jump over the metal barrier to gain entry into the US

A seven-year-old girl who US officials say tried to cross the Mexico-US border illegally with her family has died hours after being taken into custody.

The Guatemalan girl, who authorities there have named as Jackeline Caal, died of dehydration and shock, the Washington Post reports.

AP news agency quotes border officials as saying she had not had food or water for several days.

Thousands of migrants have travelled from Central America to the US border.

The migrants say they are fleeing persecution, poverty and violence in their home countries of Guatemala, Honduras and El Salvador.

Image copyright Getty Images Image caption Migrants arriving at the US-Mexico border say they are fleeing persecution, poverty and violence

Many of them say their goal is to settle in the US despite warnings by US officials that anyone found entering the country illegally will face arrest, prosecution and deportation.

What do the US authorities say?

The Department of Homeland Security (DHS) said the girl was "apprehended with her father for illegal entry with a group of 163 illegal aliens" on Thursday of last week.

The US Border Patrol confirmed the girl started experiencing fever and seizures while in its custody.

She was flown to hospital in El Paso where she suffered cardiac arrest and died.

DHS head Kirstjen Nielsen told Fox News: "It's heart-wrenching. This is a very sad example of the dangers of this journey. This family chose to cross illegally."

A department statement earlier said: "Our sincerest condolences go out to the family of the child.

"Border Patrol agents took every possible step to save the child's life under the most trying of circumstances. As fathers and mothers, brothers and sisters, we empathise with the loss of any child."

Former secretary of state Hillary Clinton tweeted that the incident reflected a "humanitarian crisis" on the border:

Why is there tension on the border?

It's been running high since the arrival of almost 7,500 migrants in recent weeks.

There has been a rise in the number of Guatemalan families apprehended at the southwest US border Family apprehensions by country of origin

Last month, US border agents used tear gas on a crowd of migrants, including children, trying to cross the border.

The agents said that personnel had been assaulted and hit by stones.

However, critics accused the Trump administration of a draconian response, while Mexico demanded an investigation into the incident.

Media playback is unsupported on your device Media caption US closes border crossing after migrant rush

The migrants have travelled in large groups, dubbed "caravans", for more than 4,000km (2,500 miles) from Central America.

Among them are many families with young children.

Donald Trump has vowed to keep each migrant on the Mexican side of the border until courts have decided their cases, meaning some face a long wait.

They have been spending time in temporary shelters in the Mexican border city of Tijuana and in Mexicali, 180km to the east.