In 1803, he outfitted schooner Nautilus and, as commanding officer, took her back to the Mediterranean. Operating under Commodore Edward Preble in Constitution against the Barbary pirates, he was promoted master commandant in May 1804 and led a division of gunboats during five attacks on Tripoli.
On 4 September 1804, Somers assumed command of bomb ketch Intrepid, fitted out as a “floating volcano,” to be sailed into Tripoli Harbor and blown up in the midst of the corsair fleet moored close under the city walls. That night, she exploded prematurely, killing Somers and his entire crew of volunteers.
Source: Naval Historical Center including Dictionary of American Naval Fighting Ships.