A team of Afghan girls whose plight resounded with the world won a silver medal for "courageous achievement" at an international robotics contest in the United States, with judges praising the group's "can-do attitude".

The First Global Challenge event in Washington ended on Tuesday, having attracted teams of teenagers from more than 150 nations.

But all eyes were on the squad of girls from Afghanistan, who had twice travelled 800 kilometres to the American embassy in Kabul, only to have their visa applications turned down.

They were finally granted entry with just one week to go until the event began after their story had gone viral.

In an interview with Al Jazeera, before US officials decided to allow them in the country, team member Rodaba Noori said: "We wanted to show our talents to the world so they would know that we do have skills."

Another team member, Fatima Qadari, had told Al Jazeera: "Afghanistan is a country at war and doesn't have a lot of resources at hand. Other countries should consider this; they shouldn't be so strict with us."

Afghanistan is not part of Trump's order to temporarily ban travel from six Muslim-majority countries. Teams from Syria, Iran and Sudan - which are on that list - were granted visas to compete. Members of the team from The Gambia were also granted visas after initially being denied.

'Robogee'

Other teams also had unique journeys.

A group of three refugees from Syria competed as team "Refugee", also known as team "Hope".

The war forced Mohamad Nabih Alkhateeb, Amar Kabour and Maher Alisawui from Syria to Lebanon three years ago.

The trio named their robot "Robogee", a combination of the words "robot" and "refugee".

Alkhateeb, 17, and Kabour, 16, said they want to be robotics engineers, while Alisawui dreams of becoming a computer engineer.

Kabour said it was important for the team to win, to "tell the world" refugees are "here and they can do it".

Alkhateeb said living as a refugee has been difficult, but he hopes to someday return home.

"I will go back after I have finished my education so I can rebuild Syria again," he said.

Some 11 million people - half the Syrian population - have been forced from their homes.

Girl power

Sixty percent of the teams participating in the competition were founded, led or organised by women.

Of the 830 teens participating, 209 were girls.

In total, there were six all-girl teams, not only the Afghan squad but also teams from the US, Ghana, Jordan, the Palestinian territories and the Pacific island nation of Vanuatu.

"It's very difficult for us because everyone thinks [building robots is] only for boys," said 16-year-old Samira Bader, on the Jordanian team said.

She said her team wants to prove that "girls can do it".

READ MORE: The Gambia school robotics team granted US visa

The US team comprised sisters Colleen and Katie Johnson and Sanjna Ravichandar.

Colleen Johnson, 16, said her team looks forward "to a day when an all-girls team is going to be no more special than an all-boys team or a co-ed team, just when that's completely normal and accepted".

Iran, US join forces

The team from Iran got some help building their robot from American students.

It transpired that the competition's kit of robot parts including wheels, brackets, sprockets, gears, pulleys and belts was not approved for shipment to Iran due to sanctions involving technology exports to the country.

So the competition recruited a robotics team at George C. Marshall high school in Falls Church, Virginia, to help.

READ MORE: Could artificial intelligence lead to world peace?

Iran's team designed the robot, and about five Marshall students built it in the US.

The team explained on its competition webpage that "our friends in Washington made our ideas as a robot".

Amin Dadkhah, 15, said working with the American students was "a good and exciting experience for both of us".

Overall, the Europe team won a gold award for getting the most cumulative points over the course of the competition. Poland got silver and Armenia bronze.

The 2018 competition will be held in Mexico City.