Shortly after that Erik XIV quickly lost any allies he was about to obtain, either in the form of Magnus or of the Archbishop of Riga. Magnus was upset he had been tricked out of his inheritance of Holstein. After Sweden occupied Reval, Frederick II of Denmark made a treaty with Erik XIV of Sweden in August 1561. Magnus and his brother Frederick II were in great disagreement, and Frederick II negotiated a treaty with Ivan IV on 7 August 1562 to help his brother obtain more land and to stall further Swedish advances. Erik XIV did not like this and the Northern Seven Years' War (1563-1570) broke out, with Sweden pitted against the Free City of Lübeck, Denmark, and Poland. While only losing land and trade, Frederick II and Magnus were not faring well. But in 1568 Erik XIV became insane and his brother Johan took his place as King John III of Sweden.