Five teenage pupils from The Gambia who built a robot for a prestigious international competition in the United States will not be able to accompany their invention to the event after being denied a visa.

The Gambian pupils become the second team of students refused entry to the US to attend the FIRST Global robotics event in Washington, DC, on July 16-18. On Saturday, it was reported that an all-girls team from Afghanistan were also denied a visa to travel to the US to showcase their creation at the same competition.

We're not giving up, despite the challenges we face, we still continue to work hard. Fatoumata Ceesay, student

Moktar Darboe, director of The Gambia's ministry of higher education, research, science and technology, told Al Jazeera that the team, made up of high school pupils aged 17-18, were "very disappointed".

"They put in so much effort into building this, and now, after all the sacrifice and energy they put in, they have been left disheartened," Darboe, who is also the team's mentor, said on Monday.

The robot, a ball sorting machine, will be shipped off in the next day or two, he added.

The Gambian American Association will represent the team at the event and the students in The Gambia's capital, Banjul, will watch it over Skype.

The FIRST Global Challenge is open to students aged 15 to 18 from across the globe. According to FIRST, around 158 countries will be represented, including 40 African countries. Only the teams from Afghanistan and The Gambia have had their visas rejected so far.

Darboe said that the visa was denied shortly after their interview at the US embassy in Banjul in April. They were not given any explanation.

"We were only told that we did not qualify and that we could try again."

According to Darboe, the students had to pay $170 each for the visa application. "Their parents had to sacrifice a lot to pay this fee."

The students continued building the robot despite being denied the visa, hoping the decision would ultimately change.

They were further buoyed by a visit of US Ambassador C Patricia Alsup to their project site last month.

"She gave us hope not to give up, and she said they would give us all their support to help us go further," 17-year-old Khadijatou Gassam, a science student and spokesperson for the team, said.

The US embassy in Banjul told Al Jazeera that it did not comment on consular affairs. Kevin Brosnahan, a spokesperson for the state department's Bureau of Consular Affairs, said he was unable to discuss individual visa cases.

'Not giving up'

Last week, the US Supreme Court allowed the partial enforcement of President Donald Trump's travel ban on residents, citizens and refugees from six Muslim-majority countries - but both The Gambia and Afghanistan are not on the list.

In March, at least 60 African citizens were denied visas for African Global Economic and Development Summit in the US state of California. Organisers said at the time they were not sure if the rejection was linked to Trump's anti-immigrant policies or if talk of the travel ban was being used to "to blatantly reject everyone".

Darboe said building the robot was difficult. When parts arrived, customs officials took their time in releasing them. "They asked us if were building RoboCop," he said.

Will Donald Trump's travel ban make the US safer?

Fatoumata Ceesay, the team's programmer, told Al Jazeera that she had come to terms with the fact their creation will be run by other students in the US.

The 17-year-old said they had worked under trying conditions, day and night, and with little guidance over the entire Muslim holy fasting month of Ramadan.

"And we started building it after the [visa] rejection. We built it despite knowing we weren't going," she said.

Gassam says that she was disappointed that she wouldn't be able to represent The Gambia and "show the world [that] 'yes, we can do it'".

"But we're not giving up, despite the challenges we face, we still continue to work hard," she said. "Next year it will be somewhere else, so I think next year we have hope to get there."