SAMAR KHAN grew up playing cricket in Afghanistan with his brother. When his family fled from Kabul to Germany four years ago, after his father was targeted by the Taliban, one of his priorities was to carry on playing. He found a club in Cologne and in early July made his debut for the Germany under-19 team against Denmark in Copenhagen. “Cricket gives me a feeling of home,” he says, “and is the reason I am integrated into life in Germany.” Of the 1m immigrants who registered in Germany last year, 154,000 were from Afghanistan. As a result, the number of cricket teams and players in Germany has trebled. Some 230 teams and over 5,000 cricketers now take part in official leagues, while thousands of others play in local games. A third of players are now estimated to be from Afghanistan. But after a spate of attacks in Germany in recent months, including several by refugees from Afghanistan, many have begun to question the country's open-door immigration policy. Some hope that cricket can help show migrants in a different light.

Cricket has always been a niche German sport. But it is helping recent arrivals settle down into their new lives. “Cricket gives them something to look forward to,” says Rishi Pillai, the captain of the national team. Some Afghans have joined existing teams, which typically have large contingents from the Asian subcontinent. Others have formed new clubs. Six months ago Wacker Burghausen, a football club in the fourth tier of German football, launched a cricket team. They now have four sides, which are almost completely made up of Afghan refugees. Locals still see cricket as an “exotic sport”, says Brian Mantle, the Englishman who runs the Deutscher Cricket Bund (DCB), the governing body for cricket in the country, but he hopes that they will be moved to join clubs too.

To cope with the demand for facilities and equipment, the DCB has had to improvise. The Lord’s Taverners, a British cricket charity, has sent kit over. Twenty new pitches have been found—not purpose-built for cricket, but land from local councils or clubs that normally play other sports. These are of varying quality. Trial matches for the national team were played on converted football pitches that proved too small for serious players. The games had to be stopped when balls were slogged out of the ground and onto adjacent train tracks.

Mr Khan dreams of soon playing for the full national side. But there is not much room on the team. For tournaments run by the International Cricket Council (ICC), countries can pick two players who have lived in a country for at least four years; the other nine must have lived there for at least seven. There are a number of recent Afghan refugees who would “walk into the team,” says Mr Mantle. “But how fit and motivated are they going to be in seven years?”

Another problem is lack of cash. The DCB’s budget, around €220,000 ($241,000) a year, most of which comes from the ICC, is spread thinly; Mr Mantle is the only paid member of staff. Getting sponsorship, too, is a struggle. The German government, which has paid €700,000 towards the construction of a cricket stadium in eastern Afghanistan, has yet to spend a cent on the sport at home.

That may change if interest continues to rise. The DCB and the players have high aims. In August, Germany won the ICC World Cricket League Europe Division 2 competition, with two players hailing from Afghanistan catching the eye, including Hamid Wardak, who was recently named Germany’s cricketer of the year. Mr Mantle reckons that Germany can make the world’s top 20 teams within a decade, which would give the country a good chance of reaching the World Twenty20 competition and the chance to play against the elite nations. That would be an unlikely achievement. But the real significance of cricket in Germany lies off the pitch.