While Italy remained neutral, Bergamini commanded the 4th and then the 9th Naval Division. He then became the Chief of Staff of the 1st Squadra Navale. He participated in the Battle of Cape Spartivento (known in Italy as the Battle of Cape Teulada) on board the battleship Vittorio Veneto. After a brief time at the Italian high command he was again named commander of 9 Naval Division (flagship Vittorio Veneto) and then of 5th Naval Division (flagship Duilio).
On 5 March 1943, he took command of Squadra Navale (the whole Italian fleet), replacing Admiral Angelo Iachino.
In the early hours of 8 September 1943, the fleet was poised to oppose the Allied landing at Salerno; later that evening, he was told of the Italian Armistice. He was ordered to reach Allied-controlled Tunisia and his fleet left La Spezia, for the Italian controlled naval base at La Maddalena.
On 9 September 1943, Bergamini received news that La Maddalena had fallen to the Germans. The fleet then headed for Tunisia. Later that afternoon, Bergamini's fleet was attacked by a wing of German bombers near Porto Torres. Bergamini's flagship Roma did not open fire immediately, following orders from Pietro Badoglio; when the ships opened fire it was clear that the German planes were staying out of range of the Italian anti-aircraft guns. Subsequently, Roma was hit by a Fritz X guided bomb, a weapon unknown to the Italians at the time. Bergamini, the ship's captain and 1,350 other crew members were killed when the ship exploded and sank.
Legacy
Bergamini was posthumously promoted to the rank of Ammiraglio d'Armata (Full admiral).