 Sperber was laid down at the Kaiserliche Werft (Imperial Shipyard) in Danzig in September 1887. She was launched on 23 August 1888, and then-Kapitän zur See (Captain at Sea) Franz Mensing gave the launching speech. She began her sea trials on 2 April 1889, which lasted until 7 June; after completion of the trials, she was temporarily decommissioned. She was thereafter assigned to the South Seas Station in German New Guinea to replace the gunboats Adler and Eber, which had been destroyed by the 1889 Apia cyclone. On 20 August, Sperber was recommissioned for her new assignment, and she departed Kiel on 4 September, bound for the Pacific. While coaling in Aden on 13 October, the cruiser received orders to head to German East Africa, which was gripped by the Abushiri Revolt. There, she was to replace the old sail corvette Leipzig and the aviso Pfeil.
