Her official objective was to control the influx of war materiel into Spain, though she also recorded Soviet ships carrying supplies to the Republicans and protected ships delivering German weapons to Nationalist forces.[12] During the deployment to Spain, Ernst Lindemann served as the ship's first gunnery officer.[13] After Deutschland was attacked on 29 May 1937 by Spanish Republican Air Force aircraft off Ibiza, Admiral Scheer was ordered to bombard the Republican-held port of Almería in reprisal.[12] On 31 May 1937, the anniversary of the Battle of Jutland, Admiral Scheer, flying the Imperial War Flag, arrived off Almería at 07:29 and opened fire on shore batteries, naval installations and ships in the harbor.