War is one big recasting exercise. Bus driver, marketing manager, retiree, family man, whatever: in an invasion all are reduced to combatant or civilian or refugee. Yet the scrambling of ordinary life can open up all sorts of unexpected roles. Socialites put on nursing uniforms, rebellious teens develop into heroes of the resistance, music-hall stars become secret agents.

It can’t be said that “ordinary life” had ever placed much of a restraining hand on Josephine Baker before the Germans marched into Paris in 1940, but the outbreak of the Second World War offered a novel addition to a series of transformations that had already turned an impoverished chorus girl from St Louis into the most photographed woman in Europe. Certain attributes stood her in good stead throughout: she danced like no one else, and she could hold a tune, but most of all Baker had grit and star quality.

She must have been a relief from the usual desperate human traffic over the Pyrenees in 1940 when she showed up at Canfranc station that winter. Wrapped in furs, trailed by mountains of luggage and discreetly attended by her tour manager, Jacques Hébert – in transit to a performance in Brazil – she descended onto the platform and made it a stage. Immediately she was mobbed. Railway workers rushed to alert wives, girlfriends, children; police and customs officers stood stunned and distracted. Baker worked the crowd and swept magnificently through the border checks.

Which was just as well, because Hébert was actually Jacques Abtey, an agent of the Deuxième Bureau (France’s embattled military intelligence service), and Baker’s luggage was packed with information of great potential value to the Allies. Some of it had been painstakingly transcribed onto her music scores in invisible ink, but some, like the photographs of landing craft the Germans planned to use in their assault on Britain, was less well concealed. She was taking an enormous risk. Alongside the starstruck Spanish police on the platform at Canfranc were ubiquitous, if momentarily disarmed, German agents.

There was every possibility that the Gestapo was aware of Abtey’s identity, and even of Baker’s recruitment by him in 1939. And Portugal – their real destination – was, like Spain, a dictatorship with an affinity for the Axis. But Lisbon also represented an opportunity for the Allies to reopen a vital channel between the French and British secret services – a link severed by the Germans’ stunning advance across the continent.

When General de Gaulle called on the French to resist in June 1940, his was a message Baker had been waiting to hear. Interviewed by Abtey in 1939, she declared herself ready to die for France, but all that had immediately been required was some tweaks to her social life: evenings spent hobnobbing with diplomats (the wife of the Japanese ambassador was a close friend) now ended with reports to Abtey. She went on starring at the Casino de Paris by night and volunteering at a reception centre for Belgian refugees by day. Then France was invaded, the Vichy administration began its assiduous collaboration with the Nazis, existing spy networks were scattered and Josephine was left kicking her heels at Les Milandes, her castle in the Dordogne. It wasn’t until Abtey and his boss at the Bureau began to formulate a way to re-establish contact with the SIS in Britain that Baker could fulfil her offer to risk her life.

Even before the war the underfunded Deuxième Bureau had struggled to counter a flood of German agents entering France. As Damien Lewis explains in The Flame of Resistance, they were hindered by the prevailing state of denial in an administration that still hoped appeasement could avert another world conflict. It was a mood epitomized by Paris in the 1920s, the city that wanted to experiment and to forget – the city epitomized by Baker. “I want people to shake off their worries the way a dog shakes off his fleas”, she said of Chez Josephine, her club on Rue Fontaine, where her high-wattage charisma put her guests at ease.

Freda Josephine McDonald was born in 1906. She was eleven when a white mob incinerated much of the black area of East St Louis, killing many. The oldest, and palest, child in her family, she grew up feeling unwanted. Her mother had been a vaudeville performer, but was reduced by Baker’s birth to supporting Josephine and the half-siblings who followed her by taking in laundry. At eight Baker was sent to work as a live-in domestic for an abusive white woman who made her sleep in the cellar with the dog. When she was allowed home she led her siblings scavenging for coal on the railroads; she also put on shows for the neighbourhood children in an improvised basement theatre. At thirteen she left to work as a waitress, then as a street performer, then on the Southern Black vaudeville circuit. She was fifteen when she slept rough in New York to try to secure an audition for Shuffle Along, a breakthrough African American hit on Broadway. Though rejected at first for being too young, too dark and too skinny, by nineteen she had earned a reputation as a standout chorus girl and was offered a comedic role in a Black revue that was headed for Paris.

The Revue Nègre opened at the Théâtre des Champs-Élysées in October 1925. Baker closed the show with her “Danse Sauvage”: the act that changed everything. Carried onto the stage on the back of her partner, wearing nothing but a feather skirt and collar, and black dancing shoes (with feathers in her hair and around her ankles), she gave a performance so shocking it caused some of the outraged audience to walk out. On stage Baker seemed at once unceasing and unstoppable; sexy and uninhibited, though too playful to be merely seductive. It’s possible to watch footage of her at the Folies Bergère, where she performed in the infamous banana skirt, creeping along the branch of a jungle tree, scooting onto the stage, collapsing into the splits and beginning a riotous belly dance (Charleston steps emerge later). According to Nancy Cunard, Baker made every other performer seem “insipid by comparison”. To French audiences hungry for something new – something freeing – this was the purity of the primitive, a body that could be fitted beautifully into the fantasies of a colonial power.

It’s hard to overstate Baker’s fame in the late 1920s. She inspired fashions, art, architecture and, touring a tinderbox Europe, riots. In Vienna church bells rang to warn of her arrival: Josephine Baker as the embodiment of sin. In Germany in 1937 (the same year she married the French Jewish businessman Jean Lion, adding more future peril to her identity), Goebbels put her on the front cover of a propaganda leaflet railing against degenerate art. She loved Paris because Paris – unlike Vienna’s clergy, and unlike home – loved her back. France, she told a journalist in 1929, “is the only country where a person can live in peace”. In 1940 she was prepared to fight for that peace.

You’d imagine that spies aim to evade notice, but when Baker and Abtey arrived in Lisbon on their top-secret mission, Josephine checked in at one of the best hotels in the city and made the headlines. Abtey managed to make contact with London anyway, where they were delighted to hear from him and even more delighted with his intelligence. Far from spiriting the pair to Britain to join the Free French as they’d expected, the SIS asked them to return to Vichy and establish a pipeline for transporting information (and eventually agents) between France and Britain.

A little later, in Marseille, Baker agreed to reprise her starring role in the Offenbach opera La Créole. She needed the money, but her career had also become her cover: international engagements secured her the kind of travel permits ordinary people could only dream of. (She stuffed her entourage with friends who urgently needed to get out of France.) And, as she’d proved at Canfranc, there is such a thing as hiding in plain sight.

The show opened on Christmas Eve. Earlier the same day Abtey joined Baker with news of their orders from London: rather than take the risk of going via Spain, the pipeline was to run between Marseille and Casablanca in Morocco (a French colony and thus formally part of Vichy France), from where intelligence could be taken to Lisbon by sea, then flown to London. Shortly afterwards they learnt that Baker was on the German blacklist. La Créole was off. She would not return to France until 1944.

Lewis is the author of eleven books about the Second World War and six on “Modern Day Elite Forces”, and in The Flame of Resistance he can’t resist describing (male) Allied derring-do in exhaustive detail, frequently swamping Baker out of her own story with information of dubious relevance. The value of the book lies in its revelations about the extent and sophistication of Baker’s efforts on behalf of Free France and the Allies, much of which has previously been obscured by a fog of secrecy maintained even, and uncharacteristically, by Baker herself. (The book draws in part on records made available only in 2020.) Far more than a willing and convenient courier, she emerges as a tireless agent and a shrewd reader of influence; used to contact with powerful men, Baker understood the dynamics of power and the individuals who wielded it. She had stayed in North Africa while shooting her film Princesse Tam Tam (1935), and soon rekindled acquaintances with fans like the Sultan of Morocco and the Pasha of Marrakech. She knew what information could be useful and how to elicit it. (At parties it was scribbled down on scraps of paper she concealed in her underwear.)

She and Abtey had washed up in a crucial location. Morocco’s airbases, modern ports, long coastline and proximity to the Strait of Gibraltar gave it huge strategic value and Churchill was determined that an assault on French North Africa would win the Mediterranean for the Allies. It seemed a near- impossible task to transport an enormous fleet across an Atlantic menaced by U-boats, and only vast efforts by the intelligence networks developed in North Africa managed to obscure, in 1942, its true destination of Casablanca.

In the early 1940s Casablanca was lousy with spies. Germany had more than 200 agents operating in Morocco, while the British and French were struggling to get by with a handful. The Portuguese police were now on to Abtey, which meant only Baker could get the necessary visas to keep travelling. She would shuttle between Casablanca and Portugal, performing sellout shows and schmoozing useful military commanders and diplomats, sometimes carrying intelligence so significant that it landed on Churchill’s desk.

When disaster struck her that summer, in the form of an infection so severe that it almost killed her, her hospital room became an unassailable meeting place where – between surgeries and through life-threatening fevers – she hosted a variety of well-wishers; people who happened to include spies, Vichy officials sympathetic to the Allies, American diplomats and North African leaders being courted by Axis and Allies alike.

Having spent the past months assuring North Africans that the Allies were fighting a war against racism, Baker and her comrades were left in an awkward position when the American army arrived, segregated. From then on her role became less espionage and more a kind of morale-boosting cultural diplomacy. Visited by Sidney Williams, the first Black director of the Red Cross, Baker agreed to perform at the opening of a venue for Black soldiers in Casablanca called the Liberty Club. She had not performed in two years; she was emaciated, her stomach held together with stitches. She managed only a few songs, but the reception was rapturous. Asked to continue performing for the troops, she laid down several conditions: she would not perform only for Americans, she would not perform for payment and she would never perform for a segregated audience.

As the Allies began their push across North Africa, Baker acted, Lewis writes, “as the glue that held together the coalition of the willing … Berber leaders, Rif chieftains, Arab dignitaries, American troops both black and white, (former) Vichyites, plus the Free French forces now mustering”. She was an icon they could all agree on; proof, supposedly, that the Allies valued people of colour. Appointed a second lieutenant in the French Women’s Air Force Corps, she followed in the wake of armies pushing east, entertaining mixed audiences from stages improvised with planks and oil drums, singing under fire in Oran, Algeria, touring as far as Egypt and Syria. She performed triumphantly in Paris after the liberation, in Britain and through Europe all the way to Berlin. When the Allied high command sought someone to visit the sick and dying at Buchenwald, it was Baker who volunteered.

She was back in hospital in 1946 when she received the Medal of the Resistance. Two years later she visited New York, where she and her new white French husband were refused rooms in a series of hotels. She spoke often of the race riots she had witnessed as a child, voicing warnings against prejudice and hatred that had made her a ready rallying figure for the fight against Nazism, and that drove her through all the battles that followed. Invited to address the March on Washington in 1963 – the only official female speaker alongside Martin Luther King – she chose to wear her French Air Force uniform.

On the evidence of The Flame of Resistance it’s a wonder that famous performers don’t become spies more often. Celebrities get away with things other people don’t. They have more mobility and tend to be very well connected. No one turns a hair if J.Lo turns up at an airport with huge amounts of luggage, and no one in the least expected Baker to stick to travel plans or contracts, or to give consistent accounts of herself. The training is also impeccable. Baker was used to punishing hours and pushing her body to breaking point – used to maintaining the pose of effortlessness. And who better to brave scrutiny than someone who had been surviving it since she was nineteen?

Whichever managers and theatre owners helped orchestrate her career, Baker had always, since those early days in St Louis, relied ultimately on herself. The ability to act on her own initiative was second nature. You could say that her success as a spy was due to the same things that made her a star: something to do with the fluidity of her persona as much as her body. In Paris in 1925 she had been offered the role of the sexualized savage, one who could unwittingly liberate the avant-garde. The acclaim for the “Danse Sauvage” had less to do with what a seasoned and talented American vaudeville performer could achieve (though it demonstrated that) than with what its audiences desired from Africa. Able to reflect the fantasies of her audiences back at them, Baker had long ago learnt how to operate as a cipher.

Yet she had modified – and would go on modifying – her image. “You have to grow and change all the time”, she once told a journalist, but those reinventions had to be carefully negotiated with the demands of audiences who appointed themselves to decide what a “Negro” performer could be. She used her life story as part of her performance, offering confidences to build that famous rapport with her audiences and using it to articulate her causes. For Baker being highly visible had always been a way of smuggling messages.

There’s something strikingly twenty-first century about the transition she made as the flashy 1920s gave way to the politicized 1930s – something that recalls the efforts of female celebrities, in the wake of #MeToo, Black Lives Matter and the Trump presidency, to reclaim their stories and put their heads above the parapet. The most successful performers are shape-shifters, and as much as they embody their times, they are also formed by them. Josephine Baker had all the inconsistencies and idiosyncrasies we expect from our stars. (One of the reasons she was able to charm Italian diplomats in Paris in the late 1930s was that she had earlier been vocal in her admiration for Mussolini.) Judging by The Flame of Resistance, there were perhaps two places where she was at her best, two places where there is nowhere and everywhere to hide: on stage and in a war.

Sarah Watling is the author of Noble Savages, a biography of the Olivier sisters. Tomorrow Perhaps the Future, her book on writers, taking sides and the Spanish Civil War, will be published in February

Browse the books from this week’s edition of the TLS at the TLS Shop