SMS Bayern was one of four Sachsen-class armored frigates of the German Imperial Navy. Her sister ships were Sachsen, Baden, and Württemberg. Named for Bavaria, Bayern was built by the Imperial Dockyard in Kiel from 1874 to 1881. The ship was commissioned into the Imperial Navy in August 1881. She was armed with a main battery of six 26 cm (10 in) guns in two open barbettes.
After her commissioning, Bayern served with the fleet on numerous training exercises and cruises. She participated in several cruises escorting Kaiser Wilhelm II on state visits to Great Britain and to various cities in the Baltic Sea in the late 1880s and early 1890s. During 1895–1898, the ship was modernized at the Schichau-Werke dockyard in Danzig; she served for another decade with the fleet before being withdrawn from active service in 1910. She was used as a target ship after 1911, until she was sold in 1919 and broken up for scrap.
Bayern was ordered by the Imperial Navy under the contract name "A," which denoted that the vessel was a new addition to the fleet. She was built at the Imperial Dockyard in Wilhelmshaven; her keel was laid in 1874 under construction number 3. The ship was launched on 13 May 1878 and commissioned into the German fleet on 4 August 1881. Along with her three sisters, Bayern was the first large, armored warship built for the German navy that relied entirely on engines for propulsion.
The ship was 98.2 meters (322 ft) long overall and had a beam of 18.4 m (60 ft) and a draft of 6.32 m (20.7 ft) forward. Bayern was powered by two 3-cylinder triple expansion engines, which were supplied with steam by eight coal-fired Dürr boilers. The ship's top speed was 13 knots (24 km/h; 15 mph), at 5,600 indicated horsepower (4,200 kW) Her standard complement consisted of 32 officers and 285 enlisted men, though while serving as a squadron flagship this was augmented by another 7 officers and 34 men.
She was armed with six 26 cm (10 in) guns, two of which were single-mounted in an open barbette forward of the conning tower and the remaining four mounted amidships, also on single mounts in an open barbette. As built, the ship was also equipped with six 8.7 cm (3.4 in) L/24 guns and eight 3.7 cm (1.5 in) Hotchkiss revolver cannons. Bayern's armor was made of wrought iron, and was concentrated in an armored citadel amidships. The armor ranged from 203 to 254 mm (8.0 to 10.0 in) on the armored citadel, and between 50–75 mm (2.0–3.0 in) on the deck. The barbette armor was 254 mm of wrought iron backed by 250 mm of teak.
After her commissioning in August 1881, Bayern was placed in reserve. She was not activated for service with the fleet until 1884; this in part had to do with the poor performance of her sister Sachsen in the fleet maneuvers of 1880. Among the problems associated with the Sachsen-class ships was a tendency to roll dangerously due to their flat bottoms, which greatly reduced the accuracy of their guns. The ships were also poorly armored, compared to their contemporaries. In addition, they were slow and suffered from poor maneuverability. Nevertheless, Bayern and her three sisters served as the I Division in the 1884 fleet maneuvers, under the command of Rear Admiral Alexander von Monts.
Bayern remained with the fleet for the 1885 maneuvers, though she was joined only by the older ironclads Friedrich Carl and Hansa. The maneuvers were begun with a visit to Ålesund, Norway, after which the fleet went to the Baltic Sea for training exercises. Bayern was demobilized at the close of maneuvers. In October 1885, August von Thomsen, who had been appointed chief gunner, set up the first long range gunnery experiments on Bayern. He went on to gain fame as "the father of German naval artillery." Bayern's three sisters and the new ironclad Oldenburg comprised the training squadron for 1886. Bayern returned to active duty in 1888, when she participated in a tour of the Baltic by the newly crowned Kaiser Wilhelm II. The fleet stopped in St. Petersburg, Stockholm, and Copenhagen on the seventeen-day cruise.
Bayern participated in the ceremonial transfer of the island of Helgoland from British to German control in the summer of 1890. She was present during the fleet maneuvers in September, where the entire eight-ship armored squadron simulated a Russian fleet blockading Kiel. She remained with the I Division in 1891; the year's maneuvers simulated a two-front war against Russia and either France of Denmark. Bayern participated in the 1892 fleet maneuvers as well. Three separate simulations were conducted, which included French blockades of the German North Sea coast and a Russian attack on Kiel. Vice Admiral Wilhelm Schröder commanded the fleet maneuvers of 1893, which simulated a protracted campaign against a superior French fleet. Bayern and her three sisters served as the Russian Baltic Fleet during the 1894 maneuvers.
The four Sachsen-class ships were transferred to the II Division before the winter cruise of 1894–1895, following the completion of the four Brandenburg-class battleships. The German fleet now possessed two homogenous squadrons of four ships each. The two divisions steamed to Orkney and the Shetland Islands in the spring of 1895. Bayern joined a massive fleet review on 21 July 1895 for the opening of the Kaiser Wilhelm Canal, which connected Kiel to the North Sea. The Autumn 1895 maneuvers simulated a high-seas battle between the I and II Divisions in the North Sea, followed by combined maneuvers with the rest of the fleet in the Baltic.
After the conclusion of the 1895 maneuvers, Bayern was taken into drydock at the Schichau-Werke in Danzig for reconstruction. The ship's old wrought iron and teak armor was replaced with new Krupp nickel-steel armor. The four funnels were trunked into a single large funnel and new engines were also installed, which increased the ship's speed to 15.4 kn (28.5 km/h; 17.7 mph). The ship's 8.7 cm guns were replaced with quick-firing 8.8 cm (3.5 in) SK L/30 guns and four 3.7 cm (1.5 in) autocannons. Work was completed in 1898. Bayern's three sisters were similarly modified between 1896 and 1899. Bayern remained with the fleet until 19 February 1910, when the ship was stricken from the naval register. She was converted into a target ship for the fleet and served in this capacity off Stollergrund after 1911. On 5 May 1919, Bayern was sold for scrapping and broken up in Kiel.