Two years ago, a 93-year-old woman died alone. She was found lying on the bedroom floor of her sheltered-housing accommodation in west London. The flat was so cluttered that the wardens struggled to remove her body. Half-a-dozen people attended the cremation, and news of her death did not spread beyond Twickenham. This is not how Roberta Cowell should be remembered. Yet, in a way, it was the ending she chose, after leading one of the most extraordinary lives of the 20th century. Before withdrawing from the world, she had been a racing driver, a Spitfire pilot and a prisoner of war. She had also been a man.

"Betty" Cowell was the first known person in Britain, and among the first in the world, to undergo pioneering gender-reassignment surgery, in 1948, before more famous cases such as April Ashley and Christine Jorgensen. Before the war, as Bob, she (Cowell herself joked in her autobiography that one of the trickiest parts of undergoing gender reassignment was knowing which pronoun to use) had been a racing driver, competing at Brooklands in Surrey and in the Belgian Grand Prix. Later, Cowell became a fighter pilot, flying Tiger Moths and Spitfires. When her plane was shot down, she was captured and interned in Stalag Luft I.

We will return to her heroic achievements in a moment. But first, the present. This is the first time Roberta Cowell's death has been reported in any newspaper. So complete was her withdrawal from public life that even her own children did not know she had died, until contacted by The Independent on Sunday. The fact that Roberta's death went unremarked upon for two years –she died on 11 October 2011 – is in itself remarkable in an age of global communication.

Download the new Independent Premium app Sharing the full story, not just the headlines

We tracked down Bob's two daughters, who last saw their father in 1948, the year he separated from their mother to undergo gender reassignment. Anne was six, Diana four. They have clear memories of waving their father off on the side of a race circuit. They would never hear from him again. Their mother remarried and had three more children, and Anne and Diana were brought up by their grandparents. Cowell's father paid for them to be sent to boarding school, and Roberta cut off all contact. Even years later, she would ignore all approaches.

This was a source of great pain to her daughters. Now 71 and 69, they were shocked to learn of their father's death. "I have never sobbed like that," says Diana when we meet. "I didn't realise that pain was still there. What our father did has always had a great bearing on my life. The way I used to cope was by flying into fantasy." Anne, her elder sister, took a more detached approach. "I felt that if someone hurt me in life, I didn't want to have anything to do with them," she says. "It was easier to shut them out."

While Anne, being older, was told what had happened at the time, Diana did not find out until later. "Nobody told me about the sex change," she recalls. "I read about it in a newspaper. They were trying to protect me. But it was the biggest shock of my life. I must have been 12 or 13. The worst thing was that suddenly, I knew this was reality. Your father's not coming back to you. Ever. And that's why it hurt so much."

Robert Marshall Cowell was born in April 1918, one of three children of the prominent London surgeon Sir Ernest Cowell and his wife Dorothy. His upbringing was typical of an upper-middle-class family of the period: strict, religious and unforgiving. A chubby child with glasses, Bob was nicknamed "Circumference" and "Bottom" at school. He was left-handed, but forced to write with his right hand.

From an early age he was obsessed with cars, and showed great mechanical ability. He would sneak into the pits of the banked Brooklands circuit, near his family home in Croydon, to help the mechanics. He soon became a racing driver, and joined the RAF as a pupil pilot in 1935. In May 1941, he married Diana Carpenter, who he had met at London University. She was also a racing driver, and like him had a degree in engineering. They had two daughters: Anne was born in July 1942, Diana in August 1944.

So far, so conventional. What happened in the years immediately after the war was anything but. In the autobiography she published in 1954, Roberta describes a feeling of restlessness and dissatisfaction, and a sense that her life was "pointless and empty". She began to realise that her excessively masculine life up to that point had been an attempt to hide "what I knew deep down inside me though not consciously: my nature was essentially feminine and in some way my world was out of joint". Months of psychoanalysis and tests confirmed that "my unconscious mind was predominantly female".

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

Physically, she also felt different. She was examined by a Harley Street sexologist, who gave his opinion that her body showed prominent feminine sex characteristics: "wide hips and narrow shoulders, pelvis female in type, hair distribution and skin female in type". Other female traits included "the absence of laryngeal relief (no Adam's apple) and a tendency of the lower limbs to converge towards the knees. My breast formation was examined and judged to be typically feminine though very little developed."

The origin of these discrepancies is unclear. Whether she was born with them, or whether, as she suggests, they were caused by "a series of emotional upsets", is impossible to know. In her book, Cowell explains that she had a unique medical condition that meant she was essentially a woman in a man's body. But amid the ignorance and confusion surrounding intersexuality, other theories abounded. Anne and Diana recall being told that Bob had changed sex as a money-making scheme. "Our father was always coming up with business ventures," says Anne. "I remember our uncles and aunts said he did it to make money, to sell his story."

Though an apparently ludicrous suggestion, it is corroborated by others. Ronald "Steady" Barker, a motoring journalist and near contemporary of Cowell's, who worked for one of Cowell's three automotive firms after the war, recalls a similar theory. "Bob took part in the first Brighton Speed Trials with a whole group of other young men who had come in from the war," he recalls. "They were all talking in a bar after the event about how boring life was, and how could they make life more exciting? One of them went on to smuggle watches from Switzerland and ended up in jail for two years.

But Cowell said: 'I reckon that there's a lot of money to be made by someone who's willing to have their sex changed.'" The Times reported that the Picture Post paid Cowell £8,000 for her story, the equivalent of £185,000 today, and that the autobiography netted Cowell a further £1,500 (£30,000). A large sum of money, but the fact that Cowell didn't sell her story until three years after she had legally become a woman suggests it was an unlikely motive.

What we do know is that Cowell had a traumatic war. Despite being deemed unfit to fly by the RAF in 1935, because of recurring motion sickness, Cowell was determined to become a fighter pilot and spent the first two years of the war in a series of frustrating training and engineering posts, including a stint in Iceland. When, eventually, she was transferred to the RAF, she was still suffering acute sickness.

Cowell flew Tiger Moths, Spitfires and Miles Masters, and knew that every day could be her last. "Narrow escapes were a daily event," she writes. "Several of my closest friends were killed, and I regarded it as just a matter of time as far as I was concerned." On one occasion, coming back from a long-range mission with one other plane, which had been shot down over the target, she lost all radio contact in thick cloud, and had to find her way home alone. She narrowly avoided crashing into the sea, landing on cliffs just as the fuel ran out. Later, she got the bends during training for high-altitude flying, and on one occasion blacked out at 40,000ft over Belgium. Miraculously, she regained consciousness in time to hear the radio operator, who guided her back to base.

In November 1944, her plane took a direct hit over Germany, and Cowell survived a crash landing, was taken into captivity, and ended up in Stalag Luft I. The conditions were appalling, food limited and clothing in short supply. At one point, there was so little food that prisoners were forced to eat the camp cats – raw.

When the war was over, Cowell set up a number of businesses around Surrey, mostly k motoring-related. By 1946, she had started racing again, driving top marques such as Altas, Maseratis and Delahayes. But the bravery Cowell had demonstrated in flying and driving would now be channelled into a very different part of her life. For three years, Cowell underwent psychoanalysis, medical examinations, and eventually surgery. As her autobiography relates, the transformation was a long and difficult period. People would point, stare and openly debate whether she was a man or a woman.

During this time, Cowell met Lisa, who would become her lifetime companion. Lisa supported Roberta throughout the transition, and they lived together on and off until Lisa's death at the end of the 1980s. Cowell also became friends with Michael Dillon, a physician who had been born female and was the first trans person to undergo phalloplasty. Dillon performed the initial operation on Cowell to remove her testicles, in 1948, which was illegal at the time. This allowed her to be certified by a gynaecologist as intersex, and for further surgery to be carried out. On 15 May 1951, she had a vaginoplasty, conducted by Sir Harold Gillies, a leading pioneer in plastic surgery.

Cowell returned to racing with some success in the 1950s, winning at Shelsley Walsh Hill Climb in 1957. The following year she acquired a De Havilland Mosquito, in which she planned to cross the Atlantic. Sadly, the project stalled and later that year Cowell was declared bankrupt. The plane was left to rot, and was scrapped in 1960. Cowell continued to race and fly, logging 1,600 hours as a pilot, but said: "Driving is what I do best. Jet planes don't have personality the way racing cars do."

Financial problems caused her to race less, and in the 1970s, Betty, as she was then known, tried to write another book to generate funds. In her last interview, in 1972, she condemned other trans people, and criticised the "permissive society", warning others not to follow in her footsteps. But the book was never published, and she withdrew from public life.

Jane Ormerod was one of the last people to know Betty. She and her husband Russell met her in 1986 when they moved to Richmond, and their gardens abutted. Betty later moved back in with Lisa and her 40 cats, but Jane remained a loyal friend to Betty until her death. Her husband was Roberta's executor. "I feel very lucky to have known her," says Jane. "She was an extremely private person, though she could be garrulous after a glass of wine. She loved to talk about her racing, and flying, and her dream was that she would fly again. Betty would always say she was not a eunuch, she was unique." Ironically, given her wartime experiences, Betty ended up looking after Lisa's many cats.

In 1990, after Lisa died, Betty moved into the flat in nearby Hampton where she would spend the rest of her life. She is remembered by neighbours as reclusive and private, though her past was occasionally referred to. Ivy Mason, who lives next door, says she always kept powerful cars. "She always had an expensive car, a big black one," she recalls. "She had been tall, but walked with a stoop. She painted her nails red and wore red lipstick, and wore a big brown wig."

David Alderson, who runs the local garage, would often talk with her about her racing days. "She'd bring her car in for its MOT, but by the end, it would only cover the two miles between tests," he says. "We became friendly and I offered to take her to Brooklands once, but she just said, 'I don't think so, dear.' She was a strong lady: very proud and independent."

Jane Ormerod was Betty's last friend, but even she was not party to details of her past. "We had no idea what had become of her children, as she never talked about it. But she was always very interested in my children. I have two daughters too, you see." Betty was "much diminished" towards the end. Her spine was bent double and swollen legs made walking almost impossible.

Anne and Diana were obviously saddened to learn of their father's death, but the news has brought a kind of closure. "It's a relief to know something at last," says Diana. Two years ago, she experienced a strange feeling that something had happened, but didn't know what. Both married young and had their own families. "I was 17 when I got married, and had my first child at 18," says Diana. "I think part of me wanted to prove that there was nothing wrong with me." Years later, one of Anne's daughters found Betty's address and wrote her a letter. "She never had a response," says Anne.

Anne and Diana's mother died in 2006. Her daughters say she was shocked and humiliated by her husband's decision, and rebuilt her life as quickly as possible. Despite the hurt Cowell caused them, Anne and Diana are immensely proud of their father. "He stood up for himself," says Diana. "He did what he felt was right. And what can you do? I think his actual words were, 'It's easier to change a body than a mind.'"

Both daughters wish they could have met Betty in later life. "I just think it's sad we could never be friends," says Anne, "especially now we know that at the end she died alone in sheltered housing."

"She was an extraordinary woman," says Diana. " I would have loved to have been with her before she died, and said, we are your family, and whatever happens there is a bond that nothing can change."

Betty's funeral was attended by the Ormerods and two neighbours. On her instructions, there was no publicity. When Jane was clearing out the flat, she came across a large enamel sign, which Betty had had made for her last business venture. It was white, with "Roberta Cowell Racing" in bright-red letters. "It was a lovely thing," says Jane. "There were no flowers, as Betty had wanted, so we put that over the coffin instead. It seemed appropriate."