Image copyright Reuters Image caption The girls were planning to participate via Skype if they were not allowed entry

A group of Afghan school girls taking part in a robotics competition in the US have been granted entry to attend it after their initial visa applications were denied, US media said.

US President Donald Trump had urged authorities to rethink their decision, AP news agency said.

A US travel ban is in place for six Muslim-majority countries, which does not include Afghanistan.

Students from The Gambia earlier also had their visa restrictions lifted.

According to AP, Homeland Security Department spokesman David Lapan said the decision to allow the Afghan girls to enter had been approved after a request by the state department.

White House spokeswoman Sarah Huckabee Sanders attributed the request to an intervention by President Trump, the news agency said.

The girls have been granted exceptional "parole" to stay in the country for 10 days, and have not been granted visas, Politico reported.

The competition organised by non-profit group First Global will see teams from 164 countries compete in a series of robotic games.

"I am most grateful to the US Government and its state department for ensuring Afghanistan, as well as Gambia, would be able to join us for this international competition this year," First Global President Joe Sestak said in a statement.

The US president's daughter and adviser Ivanka Trump tweeted in response to news that she looked forward to welcoming the Afghan team to Washington.

Image copyright Twitter/@IvankaTrump

The Afghan team of six teenage high school students are participating in the competition which runs 16-18 July with a ball-sorting robot.

The girls' visa applications for the one-week trip to the US had reportedly been blocked despite two rounds of interviews.

After the initial rejection, the students expected they would have to watch the competition via Skype from their hometown of Herat in western Afghanistan.

"We were not a terrorist group to go to America and scare people," 14-year-old Fatema Ghaderyan told the AFP news agency in Herat.

"We just wanted to show the power and skills of Afghan girls to Americans."

First Global aims to promote Stem subjects (science, technology, engineering and maths).

"All 163 teams from 157 countries have gained approval to the United States, including Iran, Sudan, and a team of Syrian refugees," Mr Sestak said. "I could not be more proud."