All four were commissioned in late 1863 or early 1864 as Prussia and its ally Austria prepared for the Second Schleswig War against Denmark, which began in February 1864. During the war, the four gunboats were assigned to coastal defense duties in the Baltic Sea, and "Comet" saw action at the Battle of Jasmund in March 1864, where she traded ineffectual fire with a Danish screw frigate at long range. The fifth and sixth members of the class, "Blitz" and "Basilisk", had been sent to the Mediterranean Sea on a training cruise and had to be recalled at the start of the war. They joined an Austrian squadron with the screw frigates and under "Kommodore" (Commodore) Wilhelm von Tegetthoff. The Austro-Prussian force attacked the Danish squadron blockading the North Sea coast of the German states in the inconclusive Battle of Heligoland, though "Blitz" and "Basilisk" were too slow to take an active role in the engagement. After the war, the ships were kept in service, mostly to conduct surveys of the coastlines of Schleswig and Holstein, duchies that had been seized by Austria and Prussia during the war.