Dr. James Barry was actually born Margaret Ann Bulkley around 1789 in County Cork, Ireland, at a time when women were barred from most formal education, and were certainly not allowed to practice medicine. Barry was the second child of Jeremiah (a grocer) and Mary-Ann Bulky. While still a teenager, it is believed that Margaret was raped by an uncle. She gave birth to a baby, Juliana, who was raised by her mother.

Margaret was interested in pursuing an education, and doing something beyond the realm of what was allowed of her gender. In the 2016 book, James Barry: A Woman Ahead of Her Time, authors Dr. Michael du Preez and Jeremy Dronfield recount a story from when Margaret was 18, where she openly chastised her spendthrift brother saying, “Were I not a girl, I would be a solider!” And a solider she would be.

When her family fell on hard times, Margaret (who was in her late teens) moved with her mother to London, where Mary Ann had a brother—James Barry, a Royal Academician and painter. The two women met Barry’s friends, including the Venezuelan-exile General Francisco de Miranda and David Steuart Erskine, the Earl of Buchan. They were impressed by young Margaret, knowing her intelligence could take her far. They likely played a role in hatching the plan for Margaret to pursue an education, and specifically, a career in medicine. The original James Barry died in 1806, leaving his sister and niece enough money to set them up—and his name up for grabs.

Three years later, Margaret Bulkley donned an overcoat (that was worn at all times regardless of the weather) and 3-inch high shoe inserts began identifying herself as James Barry. Moving to Edinburgh, the young Barry enrolled in medical school in 1809 and altered his age to match his young, boyish look. Rumors flew, as Barry’s short stature, high voice, slight build and smooth skin caused many people to suspect that Barry was a child too young to be in medical school—but Barry never broke. When Barry wasn’t allowed to sit for examinations because they suspected he was too young, Lord Erskine intervened. The soon-to-be doctor received a degree in medicine at the age of 22. Barry enlisted in the army as an assistant surgeon where once again his age was called into question, but he was eventually allowed to serve.

Barry began his military career on July 6, 1813, as a Hospital Assistant in the British Army, and was soon promoted to Assistant Staff Surgeon, equivalent to lieutenant. He then served in Cape Town, South Africa, for 10 years where he befriended the governor, Lord Charles Somerset. Some believe Somerset knew Barry’s secret. The two grew close, and Barry moved into a private apartment at his residence. Rumors circulated about the nature of their relationship and a poster was hung by an anonymous accuser stating that Somerset was “buggering Dr. Barry.” Commissions were set up to investigate the scandal, but both parties were later exonerated.

Dr James Barry, Inspector General of the Army Medical Corp .
Hulton Archive/Getty Images
Dr James Barry, Inspector General of the Army Medical Corps

Perhaps to take on a more stereotypical, brash masculine personality, or maybe because it was actually his true nature, Barry was known for his short, hot temper. Patients, superiors, army captains and even Florence Nightingale herself were on the receiving end of his anger. He threw medicine bottles and even participated in a duel, where neither party was seriously injured.

Barry’s medical skills were unprecedented. He was a very skilled surgeon, the first to perform a successful caesarean section in the British Empire where both the mother and child survived. He was also dedicated to social reform, speaking out against the unsanitary conditions and mismanagement of barracks, prisons and asylums. During his 10-year stay, he arranged for a better water system for Cape Town. As a doctor, he treated the rich and the poor, the colonists and the slaves.

Barry’s next posting was to Mauritius in 1828 where he butted heads with a fellow army surgeon who had him arrested and court-martialed on a charge of “conduct unbecoming of the character of an Officer and a Gentleman.” He was found not guilty. Barry moved wherever his service was needed, continuing to climb the ranks as he traveled the world. In 1857, he reached the rank of Inspector General in charge of military hospitals—equivalent to Brigadier General. In that position, he continued his fight for proper sanitation, also arguing for better food and proper medical care for prisoners and lepers, as well as soldiers and their families.

Dr. James Barry died from dysentery on July 25, 1865. They say on his deathbed acquaintances were waiting for a secret to be revealed—some saying they had guessed it all along. Barry’s last wishes were to be buried in the clothes he died in, without his body being washed—wishes that were not followed. When the nurse undressed the body to prepare it for burial, she discovered two things: female anatomy and tell-tale stretch marks from pregnancy.

The secret was made public after an exchange of letters between the General Register Office and Barry’s doctor, Major D. R. McKinnon, were leaked. In these letters, Major McKinnon, who signed the death certificate, said it was “none of my business” whether Dr. James Barry was male or female—a statement Barry himself probably would have agreed with.

Dr. James Barry is buried in Kensal Green cemetery, in north-west London.