SMS Lübeck ("His Majesty's Ship Lübeck") was the fourth of seven Bremen-class cruisers of the Imperial German Navy, named after the city of Lübeck. She was begun by AG Vulcan Stettin in Stettin in 1903, launched in March 1904 and commissioned in April 1905. Armed with a main battery of ten 10.5 cm (4.1 in) guns and two 45 cm (18 in) torpedo tubes, Lübeck was capable of a top speed of 22.5 knots (41.7 km/h; 25.9 mph).
 Lübeck served with the High Seas Fleet for the first decade of her career, and after the outbreak of World War I in August 1914, she was transferred to the Baltic Sea to defend Germany's coast from potential Russian attacks. She saw extensive service in the first three years of the war, during which time she participated in the seizure of Libau and was attacked by Allied submarines on two occasions. She struck a mine in 1916 but was repaired; in 1917, she was withdrawn for secondary duties. She survived the war, and was ceded to the British as a war prize in 1920, and subsequently broken up for scrap.
 The German 1898 Naval Law called for the replacement of the fleet's older cruising vessels—steam corvettes, unprotected cruisers, and avisos—with modern light cruisers. The first tranche of vessels to fulfill this requirement, the Gazelle class, were designed to serve both as fleet scouts and as station ships in Germany's colonial empire. They provided the basis for subsequent designs, beginning with the Bremen class that was designed in 1901–1903. The principle improvements consisted of a larger hull that allowed for an additional pair of boilers and a higher top speed. Lübeck was re-designed to use steam turbines instead of traditional triple-expansion steam engines to allow a comparative evaluation against otherwise identical vessels.
 Lübeck was 111.1 meters (365 ft) long overall and had a beam of 13.3 m (44 ft) and a draft of 5.4 m (18 ft) forward. She displaced 3,265 metric tons (3,213 long tons) as designed and up to 3,661 t (3,603 long tons) at full load. Her propulsion system consisted of two Parsons steam turbines, with steam provided by ten coal-fired Marine-type water-tube boilers. Her propulsion system was rated at 11,500 metric horsepower (11,300 shp) for a top speed of 22.5 knots (41.7 km/h; 25.9 mph). She was the first warship in the German Navy to be equipped with turbine propulsion. Lübeck carried up to 860 t (850 long tons) of coal, which gave her a range of 3,800 nautical miles (7,000 km; 4,400 mi) at 12 knots (22 km/h; 14 mph), a shorter range than her sisters, due to her less efficient turbines. She had a crew of 14 officers and 274–287 enlisted men.
 The ship was armed with ten 10.5 cm (4.1 in) SK L/40 guns in single mounts. Two were placed side by side forward on the forecastle, six were located amidships, three on either side, and two were placed side by side aft. The guns could engage targets out to 12,200 m (13,300 yd). They were supplied with 1,500 rounds of ammunition, for 150 shells per gun. For defense against torpedo boats, she carried ten 3.7 cm (1.5 in) Maxim guns in individual mounts. She was also equipped with two 45 cm (17.7 in) torpedo tubes, which were placed below the waterline, one on each broadside. She was also fitted to carry fifty naval mines. The ship was protected by an armored deck that was up to 80 mm (3.1 in) thick. The conning tower had 100 mm (3.9 in) thick sides, and the guns were protected by 50 mm (2 in) thick gun shields.
 Lübeck was ordered under the contract name Ersatz Mercur and was laid down at the AG Vulcan shipyard in Stettin on 12 May 1903. She was launched on 26 March 1904, and at the ceremony, the Regierender Bürgermeister (Governing Mayor) of her namesake city gave a speech. Delays with delivery of the new turbines prevented the completion of fitting-out work by about eight months. Work had been scheduled to be completed by 1 August 1904, but Krupp, the manufacturer of several of the turbine components, had significant problems casting the necessary parts. Lübeck finally began builder's sea trials on 18 March 1905. She was commissioned for sea trials on 26 April, with Fregattenkapitän (FK—Frigate Captain) Alexander Meurer as her first commander. Her trials revealed that the turbines did not produce the expected increase in speed compared to traditional triple-expansion engines, leading to further discussions over the utility of using turbines in future designs. The Navy experimented with a variety of propeller arrangements, including as many as eight screws on four shafts, and different propeller sizes and blade pitches. She nevertheless remained inferior to her sister ships in terms of acceleration and stopping.
 Her initial testing was interrupted on 30 October when unrest during the 1905 Russian Revolution prompted the German Kaiser Wilhelm II to send the ship with seven torpedo boats to Russia. He intended the ship to evacuate Tsar Nicholas II of Russia—Wilhelm's cousin—and his family if the need arose. Lübeck patrolled in the Gulf of Finland for two weeks, by which time the crisis in Russia had been contained and she was able to return to her trials, which continued for nearly a year. In March 1906, Korvettenkapitän (KK—Corvette Captain) Hermann Nordmann replaced Meurer, though he only served until April, when he was relieved by KK Otto Philipp. During this period, she operated as a flotilla leader for the torpedo boat training flotilla from 31 March to 25 April 1906, and then in the School and Experimental Ships Unit until 17 May. The ship thereafter conducted competitive testing with her sister Hamburg. On 27 August, her trials were formally concluded and she was temporarily placed in reserve with a reduced crew in Wilhelmshaven.
 The ship was reactivated on 22 September and assigned to the Reconnaissance Unit of the High Seas Fleet; over the next two years, she took part in the yearly routine of training voyages and unit and fleet exercises. In October 1906, FK Felix Funke took command of the ship. In early 1907, she participated in fleet maneuvers in the North Sea, followed by a cruise to Skagen, Denmark, and then with mock attacks on the main naval base at Kiel. In May and June, further fleet exercises were held in the North Sea, which concluded with a voyage to Norway. The fleet next assembled for the annual autumn fleet maneuvers that were held every August and September. This year, the maneuvers were delayed to allow for a large fleet review, including 112 warships, for Wilhelm II in the Schillig roadstead. In the autumn maneuvers that followed, the fleet conducted exercises in the North Sea and then joint maneuvers with IX Army Corps around Apenrade. FK Ferdinand Thyen relieved Funke in September following the conclusion of the exercises.
 In February 1908, Lübeck participated in fleet maneuvers in the Baltic Sea. In May–June, fleet training was conducted off Helgoland, and in July, the fleet sailed into the Atlantic Ocean to conduct a major training cruise. Prince Heinrich had pressed for such a cruise the previous year, arguing that it would prepare the fleet for overseas operations and would break up the monotony of training in German waters, though tensions with Britain over the developing Anglo-German naval arms race were high. The fleet departed Kiel on 17 July, passed through the Kaiser Wilhelm Canal to the North Sea, and continued to the Atlantic. The fleet returned to Germany on 13 August. The autumn maneuvers followed from 27 August to 12 September. In October, FK Robert Kühne replaced Thyen as the ship's captain. Later that year, the fleet toured coastal German cities as part of an effort to increase public support for naval expenditures.
 Lübeck was ordered to deploy to the Mediterranean Sea on 19 April 1909 to reinforce the old gunboat Loreley, which was the German station ship in Constantinople, the capital of the Ottoman Empire. Serious unrest in the country threatened Europeans there, and Loreley was not capable of protecting German interests by herself. Lübeck patrolled the southern coast of Anatolia until 2 June, when she was recalled to Germany. She arrived back on 17 June and rejoined the Reconnaissance Unit. Another cruise into the Atlantic was conducted from 7 July to 1 August. While on the way back to Germany, the High Seas Fleet was received by the British Royal Navy in Spithead. In May 1910, the fleet conducted training maneuvers in the Kattegat. The annual summer cruise was to Norway, and was followed by fleet training, during which another fleet review was held in Danzig on 29 August.  FK Hans Zenker took command of the vessel in April 1911. In June and July, the German fleet received British and American naval squadrons at Kiel. The year's autumn maneuvers were confined to the Baltic and the Kattegat, and another fleet review was held during the exercises for a visiting Austro-Hungarian delegation that included Archduke Franz Ferdinand and Admiral Rudolf Montecuccoli. Lübeck was decommissioned on 10 October 1911; she remained in reserve until mid-1914.
 Following the start of World War I in July 1914, Lübeck was recommissioned on 12 August. She was assigned to the naval forces in the Baltic Sea, first with the Coastal Defense Division tasked with patrolling the Danish straits. The ship operated in the Little Belt and along the route between Sassnitz and Trelleborg, Sweden. In October, she was transferred to the eastern Baltic for offensive operations against Russian forces. These included a series of sweeps into the northern Baltic to search for Russian vessels, the first of which took place from 8 to 13 October toward Bogskär. Another followed from 24 to 31 October, also in the area off Bogskär, after which she joined an operation against the Russian port of Libau on 16–17 November. Further sweeps were conducted in December: one toward Bogskär from 5 to 8 December, another toward Utö from the 15th to the 18th, and a final operation for the year to Öland and Gotland from 27 to 30 December.
 In March and April 1915, Lübeck was tasked with supporting German positions around Memel during a Russian counter-attack. While there, on 25 April, the vessel became the flagship of Kommodore (Commodore) Johannes von Karpf. As the Central Powers prepared to launch the Gorlice–Tarnów Offensive in early May 1915, the extreme left flank of the German Army was ordered to launch a diversionary attack on 27 April. Lübeck was assigned to the naval support for the attack; on the first day of the attack, she and the cruiser Thetis shelled the port of Libau as part of a landing demonstration to divert Russian attention there. Two days later, Karpf transferred his flag to the light cruiser Augsburg. By early May, the Army was poised to seize Libau, and so requested naval support for the attack. Lübeck and several other cruisers and torpedo boats bombarded the city on 6 May and patrolled to ensure no Russian naval forces attempted to intervene.
 Konteradmiral (Rear Admiral) Albert Hopman, the commander of the reconnaissance forces in the Baltic, conducted a major assault on Libau the next day in conjunction with an attempt by the German Army to seize the city. Lübeck joined the armored cruisers Prinz Heinrich, Roon, and Prinz Adalbert, the elderly coast defense ship Beowulf, and the light cruisers Augsburg and Thetis. They were escorted by a number of destroyers, torpedo boats, and minesweepers. The IV Scouting Group of the High Seas Fleet was detached from the North Sea to provide cover for the operation. The bombardment went as planned, though the destroyer V107 struck a mine in Libau's harbor, which blew off her bow and destroyed the ship. German ground forces were successful in their assault however, and took the city. A week later, on 14 May, Lübeck was to lay a minefield off the Gulf of Finland with Augsburg, but Russian submarines in the area convinced the Germans to cancel the operation.
 While patrolling off Libau on 28 June, Lübeck clashed with a group of Russian destroyers in an inconclusive action. On 1 July, the minelayer SMS Albatross, escorted by the cruisers Lübeck, Roon, and Augsburg and seven destroyers, laid a minefield north of Bogskär. While returning to port, the flotilla separated into two sections; Augsburg, Albatross, and three destroyers made for Rixhöft while the remainder of the unit went to Libau. Augsburg and Albatross were intercepted by a powerful Russian squadron commanded by Rear Admiral Mikhail Bakhirev, consisting of three armored and two light cruisers, resulting in the Battle of Åland Islands. Karpf, the flotilla commander, ordered the slower Albatross to steam for neutral Swedish waters and recalled Roon and Lübeck. Albatross was grounded off Gotland and Augsburg escaped, and the Russian squadron briefly engaged Lübeck and Roon before both sides broke contact. In the course of the action, Lübeck scored eight hits on the powerful armored cruiser Rurik, and she was not hit by Russian fire in return. Upon being informed of the situation, Hopman sortied with Prinz Heinrich and Prinz Adalbert to support Karpf. While en route, the cruisers encountered the British submarine E9, which scored a hit on Prinz Adalbert. Hopman broke off the operation and returned to port with the damaged cruiser.
 The ship took part in the Battle of the Gulf of Riga that began on 8 August. Either on 9 or 10 August, Lübeck was attacked by the Russian submarine Gepard outside the Irben Strait at the entrance to the Gulf of Riga. Gepard fired a spread of five torpedoes at a range of 1,200 m (3,900 ft), but Lübeck successfully evaded them. She came under attack by aircraft while moored in Windau on 10 September, but was not damaged. On 6 November, Lübeck again came under attack from an Allied submarine; on this occasion, it was the British HMS E8. Again, Lübeck managed to evade the torpedoes and escape undamaged. She alternated between Windau and Libau from November until January 1916.
 The Allies finally had success against the ship on 13 January, when a Russian mine damaged Lübeck; her stern was lifted out of the water and her foremast was knocked down, falling on the bridge. Two men were killed and another five were wounded in the mining, and around 250 t (250 long tons) of water flooded the ship. She was towed by the torpedo boat V189 before the torpedo boat was relieved by the tugboat Weichsel and a patrol boat the next day. The vessels brought her to Neufahrwasser outside Danzig, arriving on 15 January, and Lübeck was decommissioned there on 28 January for repairs. She was then towed to AG Vulcan in Stettin to have the repair work done. At the same time, she was rearmed with two 15 cm (5.9 in) SK L/45 guns and six 10.5 cm SK L/45 guns and the Maxim guns were removed. She was also fitted with a pair of 50 cm (19.7 in) torpedo tubes in deck launchers. A new bow was fitted and her funnels were replaced with new models.
 Due to crew shortages by 1916, the ship was not recommissioned after work was completed. She was instead placed in reserve until 15 March 1917, when she was reactivated for use as a target ship for the U-boat School. Beginning on 11 February 1918, she was used to train crews for the U-cruiser submarine unit. By this time, the light cruiser Stuttgart had been converted into a seaplane carrier, and the crew from Lübeck was needed to bring the vessel into service, so the latter was decommissioned on 8 March. Under the terms of the Treaty of Versailles, the ship was surrendered to the British as a war prize. She was stricken from the naval register on 5 September 1919 and was formally ceded on 3 September 1920 under the name P; the British in turn sold her for scrapping in 1922, and she was dismantled in Germany over the following year.