He rose through the ranks of the Ottoman military hierarchy and was for a time with the
Barbary Coast pirates based in
Algiers (whence his name
Cezayirli, meaning "Algerian" in Turkish). He was a fleet commander during the
Battle of Chesme aboard the
Real Mustafa and was able to extract the forces under his command from the general disaster for the
Ottoman Navy that occurred there. He arrived at the Ottoman capital
Istanbul with the bad news, but was highly praised for his own accomplishment and promoted, first to chief of staff and later to grand vizier. He
dislodged the Russian fleet which had established a base on the
Aegean island of
Lemnos in October 1770, and
forced them out of
Lesbos in November 1771. Anecdotal evidence indicates that, immediately after the defeat at Chesme, he and his men were lodged by a local priest in
Ayvalık who did not know who they were. Hasan Pasha did not forget the kindness shown at that hour of crisis and later accorded virtual autonomy to the
Greek-dominated town of Ayvalık, paving the way for its becoming an important cultural center for that community in the
Ottoman Empire in the 19th century. The defeat also prompted Hasan Pasha to establish the Naval Engineering Golden Horn Shipyard (later
Turkish Naval Academy) in 1773. Hasan Pasha blockaded
Acre in the summer of 1775 in order to check the power of the autonomous
Arab ruler of Palestine,
Zahir al-Umar. Hasan Pasha ordered Zahir to pay 50,000 piasters to relieve the siege. Zahir ultimately refused and consequently, Hasan Pasha's ships bombarded Acre, but the
Ottoman Empire manning Acre's cannons refused Zahir's orders to fire back at the ships and intentionally directed their fire away from Hasan Pasha's naval forces. Their loyalty to the Ottoman sultan precluded them from firing on his military. Zahir fled, but was killed by Hasan Pasha's troops before he could escape. In 1786, Hasan Pasha was ordered by the sultan
Abdul Hamid I to take troops to
Egypt and drive out the
Mamluk emirs led by
Ibrahim Bey (Mamluk) and
Murad Bey, who had become de facto rulers of the province. He arrived in Egypt in early August 1786 and was successful in
this campaign (although the Mamluk emirs would regain power after his death) and remained the de facto Ottoman governor of Egypt for around a year. His long-time
kethüda (assistant/deputy)
Ismail Pasha the Tripolitanian remained in Egypt and was soon appointed the
Ottoman governor of Egypt himself (1788–89, 1789–91) while his allied Mamluk emir
Ismail Bey became the
Shaykh al-Balad and de facto ruler. In the
Russo-Turkish War of 1787-1792, Hasan Pasha (then 74) commanded the Turkish troops in the beginning campaigns, taking part in the
action of 17 June 1788, the
Battle of Fidonisi, and the
Siege of Ochakov. == Death ==