At this point, the Swedish empire in Germany began to crumble. In 1675, most of Swedish Pomerania and the Duchy of Bremen were taken by the Brandenburgers, Austrians, and Danes. In December 1677, the elector of Brandenburg captured Stettin. Stralsund fell on October 11, 1678. Greifswald, Sweden's last possession on the continent, was lost on November 5. A defensive alliance with John III of Poland, concluded on August 4, 1677, was rendered inoperative by the annihilation of Sweden's sea-power, the Battle of Öland, June 17, 1676; Battle of Fehmarn, June 1677, and the difficulties of the Polish king.
Question: Who entered into an alliance with John III of Poland?
Answer: the Swedish empire