Later "Vidar", like her sister ships, was rebuilt as a minelayer, and she served in this role when the Germans invaded in 1940. During the Norwegian Campaign she served mainly in Sognefjorden. She was captured by German forces on 14 April 1940, and returned to Norway after the war.