FILE- In this Thursday, July 6, 2017, file photo, teenagers from the Afghanistan Robotic House, a private training institute, practice at the Better Idea Organization center, in Herat, Afghanistan. U.S. President Donald Trump intervened to allow the group of Afghan girls into the country to participate in a robotics competition. White House spokeswoman Sarah Huckabee Sanders confirmed the president’s intervention Wednesday, July 12, 2017. The six female students from Afghanistan had hoped to participate in an international robotics competition this month, but their visa applications to enter the U.S. were denied twice. (AP Photos/Ahmad Seir, File)
FILE- In this Thursday, July 6, 2017, file photo, teenagers from the Afghanistan Robotic House, a private training institute, practice at the Better Idea Organization center, in Herat, Afghanistan. U.S. President Donald Trump intervened to allow the group of Afghan girls into the country to participate in a robotics competition. White House spokeswoman Sarah Huckabee Sanders confirmed the president’s intervention Wednesday, July 12, 2017. The six female students from Afghanistan had hoped to participate in an international robotics competition this month, but their visa applications to enter the U.S. were denied twice. (AP Photos/Ahmad Seir, File) Credit: Ahmad Seir

A group of Afghan teenage girls will be allowed to travel to the United States to partake in an international robotics competition after their visa applications were denied twice, U.S. officials said on Wednesday.

A Homeland Security Department spokesman said in an email that the agency had approved a request from the State Department for the six girls on the robotics team and their chaperone to enter the country and attend the competition, which is set to bring teams from more than 160 countries to Washington next week.

The decision resolves a dispute that drew intense backlash from human rights activists and raised questions about whether U.S. agencies were retreating from previous efforts to advocate for young women in Afghanistan, where they are often denied educational opportunities.

The criticisms also fueled arguments that President Donald Trump is seeking to ban Muslims from entering the country. The most recent version of Trump’s travel ban restricts visas to citizens of six predominantly Muslim countries, but Afghanistan is not on the list.

The head of FIRST Global, the organization hosting the competition, cheered the news in a statement on Wednesday.

“I truly believe our greatest power is the power to convene nations, to bring people together in the pursuit of a common goal and prove that our similarities greatly outweigh our differences,” said FIRST Global President Joe Sestak, a former U.S. Navy admiral and Democratic congressman.

It remains unclear why the State Department denied the girls’ visa applications in the first place.

Politico, which broke the story Wednesday evening, reported that Trump had personally intervened and asked officials at the National Security Council to take action.