On 24 August 1787 the Ottomans declared war on the
Russian Empire and imprisoned the Russian ambassador,
Yakov Bulgakov, in the
Seven Towers. Mavrogenes replicated the gesture of the
Grand Vizier, and arrested
Ivan Ivanovich Severin, Russia's
consul in Wallachia. Severin was soon freed, after the intervention of
Georg Ignaz, Freiherr von Metzburg, the
Habsburg consul, who described Mavrogenes as acting maniacally and being terrified by the prospect of being at war. As the city of Bucharest was spread over a large area and lacked any kind of fortifications, Mavrogenes decided to build some, including the digging of a
moat from
Cotroceni to
Oborul Vechi, as well as reinforcing the walls of inns and monasteries (which were thus turned into crude fortresses). Unlike any other Phanariote ruler, he raised his own army, which reached 5–10,000 men and was equipped with several
cannons, During that period, Mavrogenes used the services of Perdicari, an
astrologer whom he trusted, and used both the predictions and his dreams for decisions in time of war, such as attacking the city of Kronstadt (present-day
Braşov). On 21 November a Habsburg army of 20,000 men, located in the
Banat and led by
Prince Josias of Coburg, started pressuring the Wallachian border and soon occupied fortified spots such as the
Tismana and
Sinaia monasteries; On 9 February 1788,
Joseph II, the Habsburg
Holy Roman Emperor, declared war on the Ottoman Empire and started spreading
manifestos in Wallachia which explained the war's purpose and promised to "free the
Romanian people from the Turkish yoke". At that time, Mavrogenes' army had about 11,000 soldiers, and there was also an army of about 15,000 Turks assisting him. With these forces, he obtained a few victories in the battles of
Târgu Jiu and
Câmpulung, and was able to prevent a Habsburg invasion for about a year. These victories, together with the predictions astrologer made him confident in a victory and attacked Kronstadt from July to October 1788, but failed to take the city. As the winter of 1788–1789 was harsh, no further military actions were carried out. After Abdul Hamid died in April, the new sultan,
Selim III, gave Mavrogenes about 5–6,000 soldiers from
Rumelia. In the meantime, the Russian army reported victories in Moldavia and rendezvoused with the Habsburg Army in
Adjud, advancing toward Wallachia. On 21 July 1789 they fought the Wallacho-Ottoman army led by
Grand Vizier Koca Yusuf Pasha in the
Battle of Focşani, with an undecided result. A second confrontation occurred as the
Battle of Rymnik; more than 10,000 died on the Ottomans' side. Mavrogenes fled Bucharest on 26 October, accompanied by an army of 1,000 men, after appointing
Dumitru Turnavitu as temporary
Caimacam. Most Wallachians welcomed Prince Coburg's army, and the local boyars accepted a document which basically
annexed Wallachia, while keeping autonomy to the same level as within the Ottoman Empire. The country was, however, soon hit by a major
plague and
famine; these were still claiming lives after the end of the war and through the early years of
Alexander Mourousis' rule. ==Legacy and reputation==