Once his squadron arrived in Tripoli, Silvori sent the "Tritone" into the harbor under a flag of truce in order to begin negotiations with Karamanli's government. With assurances from the resident British consul that they would be safe, Silvori went ashore on the 26th and met the Tripolitanian envoy, General Haggi Mohammed. Although negotiations at first seemed to be going well, the next day Karamanli sent a note with suggested terms that essentially abrogated the peace treaty that British Admiral Edward Pellew had negotiated on Sardinia's behalf after the Bombardment of Algiers in 1816. Seeing that Karamanli had no intention of offering acceptable terms, Sivori decided his best course of action would be to attack Tripoli. Before returning to his squadron Sivori managed to get the British consul to take under his protection what Sardinians remained in Tripoli. Salvori's force had a significant advantage over the Tripolitanian fleet, which only had a 12-gun brig and a pair of 6-gun schooners defending the harbor. Despite the disadvantage in naval power, Karamanli had significant forces ashore and several forts and shore batteries defending the harbor. Upon returning to his vessel, Salvori gave Karamanli a four-hour ultimatum that he would bombard the city unless better peace terms were offered by the Tripolitanians.