Baba Mohammed ben-Osman or Muhammad V ben Osman was Dey of Ottoman Algeria from 1766 to 1791.the adoptive father of :fr:Sidi_Hassan|Baba Hassan Pacha and the grandfather of :fr:Mustapha_Pacha#cite_note-2|Mustapha Pacha. Under his rule he declared war against Denmark-Norway because he demanded that an annual payment to stave off piracy by Denmark-Norway should be increased, and he should receive new gifts. Denmark-Norway refused the demands, beginning the Danish-Algerian War.
Beginning in administration and as minister
Having learned to read and write, he became khodja after having bought his office in the state for the sum of 1000 pieces. He practiced with various garrisons before being promoted to the personal guard of the palace deylical. Then he became Khaznadji of Dey Baba Ali who then designates him as his successor.
Restoration of the prestige of the Regency outside
He succeeded the Dey Baba Ali in 1766. Spain tried to establish a peace with the Regency; these negotiations only resulted in an exchange of captives between November 1768 and February 1769. Mohamed Ben Osman declared war on Denmark-Norway in 1770 and pushed a Danish attack on Algiers in 1772, and notably imposed on United Kingdom, the United States and the Kingdom of the Two Sicilies the payment of maritime tribute. However, following this period of calm, the Algerian corsair activities intensify and cause distress on the southern shores of Spain and partially disrupt its maritime traffic. The Spanish were therefore trying the Limpieza del Mar operation to try to end this corsair presence in the Western Mediterranean, without success. In 1775, Alejandro O'Reilly was sent to the head of an armada to take Algiers. Dey Mohamed Ben Othmane inflicts them a heavy defeat in the vicinity of El Harrach. In 1776, he appointed as Wakil al Kharadj, Sidi Hassan who will open with his counterpart Floridablanca a period of rapprochement between the governments of Algiers and Madrid. However a peace with Spain is not to the advantage of the dey; piracy earns a lot of income and asking for the release of a captive may even be perceived in Algiers as a humiliation. With the diplomacy over, he finds the pretext of the lack of peace between the Ottoman Empire and Spain, and invites the latter to make peace with the Empire before negotiating with himself to save time and avoid asking for peace in Spain. In fact, even the Ottoman Sultan categorically refuses to interfere in the affairs of these regencies "considered as independent states". The Spaniards finally get a firman to the Regencies of North Africa, that the dey Mohamed Ben Othmane had already planned to reject. Indeed, apart from the spiritual connection, at the time of Mohamed Ben Othmane, the Regency pretended to manage its internal and external affairs independently. Then King Charles III of Spain decided to declare war again. He sent squads to bomb Algiers between 1783 and 1784 to impose peace. Having found that the Sublime Porte had no authority over Algiers, the Madrid cabinet sought a direct way to negotiate peace. The negotiations were difficult and on June 16, 1785 a peace agreement was concluded. Dey Mohamed Ben Othmane demanded in the peace talks a compensation of 1,000,000 pesos for the various expeditions. The members of the Diwan of Algiers also obtained the attribution of the present diplomats.
Domestic policy
On a national level, his reign, the longest of all the deys, was marked by stability. In the management of the affairs he manifested a great sense of the state. He was busy recovering Oran and Mers el Kebir under Spanish tutelage. He appointed an energetic Bey in the west, Mohamed el Kebir, whom he instructs to take these two places. He also carried out successful campaigns to pacify the hinterland. He was also able to face the rise of Constantinois where he named another illustrious Bey Salah Bey ben Mostefa in 1771. He died on July 12, 1791 and was replaced by his Khaznadji and his adopted son :fr:Sidi_Hassan|Sidi Hassan.