Joan of Arc is best remembered for leading French troops to victory in the Hundred Years' War. Although many know about the religious visions she began to experience as a young woman, her courageous deeds in battle, and her execution at the stake, fewer know that one of the most damaging charges at her trial had to do with her clothes.

Dressing in a man’s tunic and hose was more than a fashion statement for Joan. When she was born in Domrémy, a village straddling the border between France and the Holy Roman Empire, around 1412, the Hundred Years' War between France and England had already lasted 75 years. The French House of Burgundy, allied with the English monarch Henry V, controlled the northern part of France, while those loyal to the reigning French royalty controlled the south. The French had not achieved a single victory in more than a generation, and their prospects seemed so bleak that in 1420 Henry V and Charles VI signed the Treaty of Troyes, proclaiming Henry as Charles’s successor. The Crown Prince, Charles VII, rejected his father’s decree and declared himself the true ruler of France.

In 1425, a devout 13-year-old Joan first heard the voices of saints (St. Michael the Archangel, St. Catherine of Alexandria, and St. Margaret of Antioch), urging her to lead troops into battle. At 17 years old, she convinced Sir Robert de Baudricourt, commander of a royal garrison, to let her go see Charles VII. While traveling to court, she began to dress like a man.

The prince was skeptical of Joan but desperate for a way to end the war, so he arranged for her to accompany his armed forces. The young woman, clad in white armor atop a white horse, carrying a white banner embroidered with fleurs-de-lis, inspired the downtrodden troops, offering key motivation and helping deliver necessary supplies and reinforcements in the decisive battle of Orléans in 1429. After a series of other victorious battles, Joan helped Charles VII hold his coronation in Reims, standing near him during the ceremonies.

But the war wasn’t won, and the Burgundians captured Joan during a skirmish outside Compiègne. They delivered her to the English for 10,000 Francs, and they then turned her over to an ecclesiastical court at Rouen, which tried her for heresy and witchcraft.

When her captors asked why she wore men’s clothing, Joan replied, “Dress is but a small matter.” But upon repeated questioning, she hinted that wearing female garb imperiled her chastity. (The soldier’s clothing she wore included a complicated series of straps connecting the hose and tunic—much harder to take off than a dress.) When told she could not attend mass unless she wore a dress, she said, “the dress of those who receive the Sacrament can have no importance.”

Her inquisitors disagreed.

After threats of torture and rounds of cross examination, Joan signed a document denying her visions and agreeing not to wear men’s clothes. She was sentenced to life imprisonment, but avoided execution. However, within a few days, possibly after some unwanted male advances from prison guards, but more likely because she didn’t understand what she’d signed and hadn’t been allowed to attend Mass even if she wore female clothes, she returned to the tunic and hose. At the same time, it was discovered that she was still hearing voices. Frustrated by her relapse into heresy—both because she continued to wear men’s clothes and continued to claim hearing voices of saints—the pro-English Bishop of Beauvais, Pierre Cauchon, decided to excommunicate and then execute her, partly for the heresy of wearing men’s clothes.

The charge was defying the Biblical verse Deuteronomy 22:5, which said that women should not wear “that which pertaineth unto a man.” Cross-dressing was generally frowned upon by medieval church and state, but there’s no record of it being prosecuted or leading directly to a death sentence. Even religious scholars agreed it was sometimes necessary: In Summa Theologica, the priest St. Thomas Aquinas wrote that women wearing men’s clothes were sinful, but said it might be done sometimes “without sin on account of some necessity, either in order to hide oneself from enemies, or through lack of other clothes, or for some similar motive."

Despite the theological wiggle room, Joan’s captors continued to harp on the sinfulness of her chosen wardrobe. During questioning before her second trial, they asked why she resumed wearing men’s dress, and she responded that it was "more lawful and suitable for me to resume it and to wear man's dress, being with men, than to have a woman's dress."

The bishop determined that the devil persuaded her to dress like a man, and declared her a relapsed heretic. Joan was sentenced to death, and at the age of 19, on May 30, 1431, she was burned at the stake—reportedly wearing a dress. As a heretic she could not be buried in holy ground, so her ashes were thrown into the river Seine.

Charles VII eventually helped overturn her sentence. In 1449, 18 years after her death, the French recaptured the city of Rouen—and he asked that the heresy ruling be overturned so it wouldn’t tarnish his claim to the throne. In 1456 a Trial of Rehabilitation declared Joan innocent, and in 1920 the Catholic Church canonized her as a saint. She’s now the patron saint of France, soldiers, and prisoners.

Despite the reversal of Joan’s sentence, it would be centuries before women could wear men’s clothes in public without causing a scandal. In fact, a French law forbidding women from wearing pants remained on the books until 2013. The law required Parisian women to ask permission from city authorities before “dressing as men,” and stipulated that they could not wear trousers unless “holding a bicycle handlebar or the reins of a horse.” Joan of Arc wouldn’t have been pleased; there was no exception for divine missions.