John IV, Duke of Krnov

John IV, Duke of Krnov (also known as John IV of Opava-Racibórz or John the Elder; ; Johann IV. von Jägerndorf or Johann III. von Troppau-Ratibor; c. 1440–1483 in Wodzisław Śląski) was a member of the Opavian branch of the Bohemian Přemyslid dynasty. He was Duke of Krnov from 1452 to 1474 and Duke of Wodzisław Śląski from 1464 until his death.

Life
John IV was the elder son of Duke Nicholas V of Krnov and his wife, Margaret Clemm of Ellguth. John IV and his younger brother Wenceslaus III were still minors when their father died in 1452. Their step-mother, Barbara Rockemberg and their uncle Wenceslaus II (d. 1456) took up the regency. Afterh the brother came of age, they initially ruled their inheritance jointly. However, in 1464, the inheritance was divided. John IV received Krnov, Bruntál, and Wodzisław Śląski; Wenceslaus III received Rybnik, Żory and Pszczyna.

During the war between Bohemia and Hungary for supremacy in Bohemia, John IV supported the Bohemian King, George of Poděbrady, in 1469, and after George's death, his successor Vladislaus II. Because of this, King Matthias Corvinus of Hungary took John IV prisoner in 1474 and forced him to cede Krnov. john IV retained Wodzisław Śląski, where he died in 1483.

John's sister Barbara (d. 1510), who had married Duke Jan IV of Oświęcim in 1475, objected to Matthias Corvinus against the shameful treatment of her brothers and the theft of her father's inheritance. This was probably the reason why he styled John's widow as Lady of Wodzisław Śląski, Rybnik and Żory After Matthis Corvinus died in 1490, Barbara styled herself as Lady of Krnov.