6 May, the IV Squadron ships were tasked with providing support to the assault on Libau. Wittelsbach and the other ships were stationed off Gotland to intercept any Russian cruisers that might attempt to intervene in the landings; the Russians did not do so. After cruisers from IV Scouting Group encountered Russian cruisers off Gotland, the ships of VII Division deployed—with a third dummy funnel erected to disguise them as the more powerful s—along with the cruiser . The ships advanced as far as the island of Utö on 9 May and to Kopparstenarna the following day, but by then the Russian cruisers had withdrawn. Later that day, the British submarines and spotted IV Squadron, but were too far away to attack them. From 27 May to 4 July, Wittelsbach was back in the North Sea, patrolling the mouths of the Jade, Ems, and Elbe rivers. During this period, the naval high command realized that the old Wittelsbach-class ships would be useless in action against the Royal Navy, but could be effectively used against the much weaker Russian forces in the Baltic. As a result, the battleships were transferred back to the Baltic in July, and they departed Kiel on the 7th, bound for Danzig. On 10 July, the ships proceeded further east to Neufahrwassar, along with the vessels of VIII Torpedo-boat Flotilla; after arriving, Wittelsbach ran aground and Schmidt transferred his flag to Braunschweig. She was able to free herself and was not damaged in the incident, and the following day Schmidt returned to the ship. The IV Squadron ships sortied on 12 July to make a demonstration, returning to Danzig on 21 July without encountering Russian forces. Battle of the Gulf of Riga The following month, the naval high command began an operation against the Gulf of Riga in support of the Gorlice–Tarnów Offensive that the Army was waging. The Baltic naval forces were reinforced with significant elements of the High Seas Fleet, including I Battle Squadron, I Scouting Group, II Scouting Group, and II Torpedo-boat Flotilla. Prince Heinrich planned that Schmidt's ships would force their way into the Gulf and destroy the Russian warships in Riga, while the heavy units of the High Seas Fleet would patrol to the north to prevent any of the main Russian Baltic Fleet that might try to interfere with the operation. The Germans launched their attack on 8 August, initiating the