It was a heroes’ welcome you may have missed. Cheering crowds lined the streets, children on bikes wore polka dot jerseys and two sporting idols waved from the open roof of a polka dot Toyota headed straight to meet the president.

Not footballers, nor runners, but cyclists. Daniel Teklehaimanot and Merhawi Kudus were returning to their home country after making history by becoming the first black Africans to compete in the Tour de France, with the former spending several days in the polka dot King of the Mountains jersey. Enough to earn instant immortality in cycling-mad Eritrea.

“Merhawi Kudus and I were welcomed by the president and there was a big parade in [the capital] Asmara,” said 26-year-old Teklehaimanot. “I never believed that this will happen but it was really amazing and I am happy to see that so many people at home are enjoying our success. It’s good to see their emotions and that it gives them motivation as well.”

The pair were competing for the South African-registered MTN-Qhubeka, the first African team to take part in the Tour de France, a story some regarded as being as improbable as the Jamaican bobsleigh team competing at the 1988 Winter Olympics.

But MTN-Qhubeka – also comprising riders from Belgium, Britain, Norway and the US – stunned the cycling world by finishing fifth in the overall team standings.

“As a team we had a stellar tour,” said Teklehaimanot, who took up cycling as a boy. “We never expected to do so well, even though we hoped for a good race. It was very nice to give the fans something back. All the Eritrean fans, the fans from South Africa and all over the world that cheered for us during these three weeks were a great motivation.”

The adulation illustrates how cycling is the undisputed national sport – and quasi-religion – in Eritrea, a country of 6 million that remains largely opaque to the outside world.

Eritrea’s cyclists are among the best on the continent and have dominated African championships in recent years. From a young age they cut their teeth on mountainous roads and at high altitude: Asmara is 2,325 metres above sea level, at the tip of an escarpment of the Great Rift Valley.

“It’s unbelievable how many bikes there are,” said Jock Boyer, a US-born coach and former Tour de France rider who has been promoting cycling in Africa since 2006. “Many of the streets in Asmara have painted finish lines because they have so many races. The TVs in cafes show old cycling races. It’s definitely a country that’s been riveted with cycling for many decades. It’s a passion and they’re proud of their riders.”

Boyer’s work with genocide survivors in Rwanda became the subject of a film, Rising from Ashes, and his Team Rwanda gained cult status. He has since expanded into Ethiopia and Eritrea under the name Team Africa Rising.

Now, work is under way on a new high-altitude training camp in Asmara, and Boyer intends to bring in international experts to improve the skills of Eritrean mechanics and masseurs.

Cyclists from Team Rwanda, who have joined forces with riders in Eritrea and Ethiopia under the banner Team Africa Rising. Photograph: Jonathan Torgovnik/Getty Images

“We’re trying to streamline things there and help the staff get to a higher level. The talent is massive and the next wave of riders is going to be better than the first,” he said.

Team Africa Rising is also focusing on Eritrea’s women cyclists, who have proved to have as much potential as their male counterparts. In 2013, Yerusalem Gebru, Tsehainesh Fitsum and Senait Mengis dominated at the African Championships, winning gold in the team time trial, while last year the Eritrean cycling federation organised CycloFemme, its first race exclusively for women.

There is support from the Eritrean government, Boyer said, but logistical problems include power cuts, water access and “incredibly slow” internet. Then there are international suspicions that Eritreans are merely trying to use sport as a pretext to flee dictatorship and claim asylum. They currently form the third biggest national group, behind Syrians and Afghans, among migrants who cross the Mediterranean to Europe.

Three young Eritreans were invited to train at the International Cycling Union in Switzerland last year but could not obtain visas from the Swiss government. “The next big challenge is the visa demands for almost every country they try to visit,” Boyer says. “We’ve always got to prove they’re not just going to stay there. In fact there are no problems with professionals: they know that if they defect, they cut off their entire career.”

The Primo Giro dell’Eritrea

Just as cricket in India or rugby in South Africa can be traced to British imperial history, so cycling in Eritrea is a legacy of Italian colonialism that began in the 1890s. The first bicycles were introduced there in 1898, according to the academic FikreJesus Amahazion, and a generation later Eritreans had their own cycling clubs.

Benito Mussolini became dictator of Italy in the 1920s with grand plans for a second Roman empire in Africa. Asmara was known as “Little Rome” and still has the architecture to show how the Italians tried to make it so. In a cycling race in 1939, Eritrea’s Ghebremariam Ghebru beat several Italians and shattered “colonial myths about Eritrean inferiority,” Amahazion has noted. Italy was forced to give up its African territories, including Eritrea, after defeat in the second world war.

But Eritreans were not allowed to race in the first Primo Giro dell’Eritrea in 1946. Named after the Giro d’Italia, it was the exclusive preserve of the Italian community. From 1961 Eritreans fought a bitter war for independence from Ethiopia. A recent Washington Post article told how bicycles were banned for a time because Ethiopia suspected they could be used by the secessionists to aid attacks.

Independence was finally sealed in 1993 and the Tour of Eritrea was resurrected eight years later.

Cycling continues to be a way of life. “It is the most popular sport in Eritrea,” said Jean-Pierre Heynderickx, a Belgian former cyclist who visited the country recently. “Even on days when we were not racing, people approached us on the street and started to talk to us about the sport.

“I’m really impressed by the amount of interest. It’s there on normal days. But on race days all focus is on cycling. I worked together with the federation to help setting up big screens to give the fans the opportunity to watch the races. Also during the Tour de France, there were plenty of public viewing spots.”

Heynderickx attended the recent Eritrean national championships in Asmara. “There were thousands of fans lining up on the roadside, sometimes in two to three rows. It was incredible. I have barely seen so many people watching a race live – it was really something special.”