Serious differences arose between the queen and one of her former subjects, Bartolommeo Prigiani, who had become pope under the name of Urban vi. Annoyed by the queen’s opposition, the pope one day angrily said he would shut her up in a convent. Joan, to avenge the insult, openly favoured Clement VII, the anti-pope, and offered him a home in her own castle, when, pursued by Pope Urban’s army, he had taken refuge at Fondi. But the people rebelled against Clement, and killed the Archbishop of Naples, who had helped to elect him: they broke the cross that was carried in procession before the anti-pope, and hardly allowed him time to make his escape on shipboard to Provence. Urban declared that Joan was now dethroned, and released her subjects from their oath of fidelity to her, bestowing the crown of Sicily and Jerusalem upon Charles de la Paix, who marched on Naples with 8000 Hungarians. Joan, who could not believe in such base ingratitude, sent out his wife Margaret to meet her adopted son, though she might have kept her as a hostage, and his two children, Ladislaus and Joan, who became later the second queen of that name. But the victorious army soon arrived at the gates of Naples, and Charles blockaded the queen in her castle, forgetting in his ingratitude that she had saved his life and loved him like a mother.
Joan during the siege endured all the worst fatigues of war that any soldier has to bear. She saw her faithful friends fall around her wasted by hunger or decimated by sickness. When all food was exhausted, dead and decomposed bodies were thrown into the castle that they might pollute the air she breathed. Otho with his troops was kept at Aversa; Louis of Anjou, the brother of the King of France whom she had named as her successor when she disinherited her nephew, never appeared to help her, and the Provencal ships from Clement VII were not due to arrive until all hope must be over. Joan asked for a truce of five days, promising that, if Otho had not come to relieve her in that time, she would surrender the fortress.
On the fifth day Otho’s army appeared on the side of Piedigrotta. The fight was sharp on both sides, and Joan from the top of a tower could follow with her eyes the cloud of dust raised by her husband’s horse in the thickest of the battle. The victory was long uncertain: at length the prince made so bold an onset upon the royal standard, in his eagerness to meet his enemy hand to hand, that he plunged into the very middle of the army, and found himself pressed on every side. Covered with blood and sweat, his sword broken in his hand, he was forced to surrender. An hour later Charles was writing to his uncle, the King of Hungary, that Joan had fallen into his power, and he only awaited His Majesty’s orders to decide her fate.