"Salamander" was laid down at Stabilimento Tecnico Triestino at its Trieste shipyard in February 1861, launched on 20 or 22 August 1861, and completed in May 1862, some six months before her sister ship . During the Second Schleswig War in 1864, "Salamander" and "Drache" remained in the Adriatic to protect Austria's coastline, while a squadron was sent to the North Sea to attack Denmark. In June 1866, Italy declared war on Austria, as part of the Third Italian War of Independence, which was fought concurrently with the Austro-Prussian War. Rear Admiral Wilhelm von Tegetthoff, the commander of the Austrian Fleet, immediately began to mobilize his fleet. As the ships became fully manned, they began to conduct training exercises in Fasana. Tegetthoff brought the Austrian fleet to Ancona on 27 June, in an attempt to draw out the Italians, but the Italian commander, Admiral Carlo Pellion di Persano, refused to engage Tegetthoff.