Omar Agha was the Dey of the Regency of Algiers from April 1815 to September 1817, after the assassination of his predecessor Mohamed Kharnadji the 7th of April 1815, who had been in office for only 17 days.
He launched a war against Tunis, and led the Attacks of Barbary privateers on American ships. An expedition of the US Navy led by Commodore Stephen Decatur in command of a squadron of nine ships, was conducted in 1815 against the Regency of Algiers. The episode is known as the Second Barbary War. The operation forced Dey Omar to sign a treaty ending attacks of piracy, a treaty that he denounced shortly thereafter.
The Congress of Vienna, which addressed the problem of Christian slaves from Barbary piracy, charged the United Kingdom and the Netherlands to negotiate with the Dey of Algiers and the Beys of Tunis and Tripoli. Although the latter two were agreeable, it was not the same for Omar Agha. It would take the 9-hour Bombardment of Algiers (1816) on 27 August 1816, by an Anglo-Dutch naval force commanded by British Admiral Lord Exmouth, to compel the Dey to abolish christian slavery. However, the bombardment of Algiers did not destroy Barbary power. Despite the signing of the treaty and the release of 3,000 christian slaves, Dey Omar set to rebuilding the city's defences, putting its Jewish inhabitants to forced labour in the place of Christian slaves. Moreover, the problem remained such that it was one of the main areas of contention at the Congress of Aix-la-Chapelle (1818).
Regardless, the Janissaries came for the Dey on the morning of September 8, 1817 and had him strangled and buried within an hour. Following his repeated defeats and domestic uproar, a new Dey was soon proclaiming defiance. His successor was Ali ben Ahmed.