“Just as there are a lot more people than kings,” said German director Eva Knopf recently, “there are many more extras than there are actors in most films.” Her film Majub’s Journey highlights an unusual extra: Majub bin Adam Mohamed Hussein, who was born in Dar es Salaam in what is now Tanzania and moved to Germany in the 1920s. There he changed his name to Mohamed Husen and appeared in films alongside some of the country’s most famous actors, sometimes in movies that championed German imperialism, before ending up in a concentration camp for having an on-set interracial relationship.

“I didn’t know much about Africans in Germany during the 1930s and 1940s,” says Knopf. “It seems like German people’s awareness of colonialism was washed away because of the second world war and the Holocaust. We lost our colonies after the first world war, so we felt we didn’t have to deal with them any more. Our history with them didn’t reach into the 1950s and 1960s like it did in many other European countries. So, the metaphor of the extra represents both the extras themselves and the absence of Africans from the German imagination.”

Born in 1905, Husen volunteered, aged nine, for the Askari, elite native troops who helped Germany keep a tight grip on its dominions. “No one in Germany would expect that Kaiser Wilhelm had child soldiers,” reflects Knopf. “Some would carry weapons to the frontline. This was very dangerous anyway, but they couldn’t even use the weapons to defend themselves.”

Husen’s father died during the first world war and he, too, was injured in service. Later, he got a job as a ship steward and sailed to Hamburg before heading to Berlin where, defiantly and unsuccessfully, he demanded back wages he claimed were owed to his family. He was instructed to leave the country, but the order wasn’t carefully administered and he stayed on without papers. He married a white actor, fathered a child by his mistress and eked out a living by working in costume at a cowboy-themed bar, at an Africa-themed circus and as a Swahili teacher at Berlin University’s Foreign Institute, where he primed civil servants for life in Africa.

At this time, port and working-class communities in Hamburg and Berlin had significant black populations. The popularity of performers such as Josephine Baker and Paul Robeson offered migrants the chance to pretend to be from the US. Often they drifted between jobs in cabaret, dance and acting. Husen found blink-and-miss-them roles as a bellboy, a waiter and a saloon-bar lag, which, says Knopf, were two-dimensional. “He and other black performers were portrayed more or less as children.”

A statue of Majub, whose story was pieced together by director Eva Knopf. Photograph: Rainer Hoffmann

Yet, for many German Africans, life on a film set was better than life outside. The studio was a safety zone, a place of make-believe rather than austere reality, a money-earning gig, a hub for gossip and friendship. According to Dorothea Diek, quoted in Robbie Aitken and Eve Rosenhaft’s study Black Germany (2013), “It was cheerful and cosy: no politics, no Nazis, just happy people. We were all together – young and old Africans.” On the set of Husen’s last film, German Africans were so aghast at the shivering, emaciated Togolese PoWs they performed alongside that they banded together to give them cigarettes and clothes.

It was also on that set that Husen’s fortunes took a dramatic tumble. He was playing Ramazan, the loyal servant of Carl Peters in Herbert Selpin’s 1941 biopic of the German explorer and Scramble for Africa conquistador. Peters was infamous for executing his black mistress after he discovered she was having an affair with his man-servant. Husen was denounced by an informant for his extramarital affair and sent, purportedly for his own safety, to Sachsenhausen, where he died four years later.

Other film-makers might have portrayed Husen as a pioneer or hero, a symbol of Germany’s far-from-glorious relationship with people of African descent. Knopf’s screenplay is spare and ruminative, as keen to point out how little is – and could be – known about him as it is to celebrate his life. “I don’t know if I liked him,” she says. “He wasn’t what the Nazis wanted him to be – a proper Askari. But nor was he what we would want him to be – an anti-colonial freedom fighter or an anti-fascist.” Indeed, by the mid-1930s, he was dressing up in military gear and appearing at rallies in front of banners bearing the slogan “Germany needs colonies”. “He went his own way. He doesn’t fit any clear-cut patterns of how we might think about history.”

Some may think Husen a chump. What kind of fool would have travelled to a recent imperial giant hoping for social recognition or economic justice? “He took the Germans at their word,” suggests Knopf. “He was never meant to appear in Germany. He was just a fantasy, a story they told about themselves and about how faithful the Askari were and how much the Germans honoured them. You have to wonder: did he just not understand what he was doing?”

The trailer for Majub’s Journey, featuring footage of the actor from the era.

Husen’s life is rich in mystery. No diaries, correspondence or personal photographs appear to have survived. Knopf found a sheet of notepaper that he had personally designed, but it contained no writing. His name would not have been listed in credit sequences, and no trade magazines would have interviewed him; after all, as the film’s narrator comments, “extras are there only for the clothes they wear and the spot of moving colour that they bring to the screen.”

His 12-year-old son, Heinz Bodo, supposedly collected his father’s ashes, but it seems likely that he died soon after during the bombing of Berlin.

In a sense, Husen is a ghost, one who, like many immigrants from formerly colonised nations, is barely visible even upon arriving at the imperial centre. What non-filmic traces of him exist are down to his run-ins with the authorities – asking for help with rent, seeking compensation for military valour. Immersing herself in the archives, watching countless films from the period, trying to make out Husen in scenes captured on now-degraded stock, Knopf became a kind of surveillance operative. At the same time, she worried that bringing these forgotten images back into circulation would heap fresh humiliation on him.

Yet, what makes Majub’s Journey so compelling is its artfully conveyed tension between the desire to liberate Husen from anonymity and the suspicion that his absence from the cinephilic record may be a blessing in disguise. “History is often written on the basis of what survives,” says Knopf. “But there are all these histories and tragedies and lost voices and souls that also shape the way our world is today. When you screen these films, you can make these ghosts appear again.”