1838-1840: The Second Oriental Crisis
When Muhammad Ali tried to gain influence among the Syrian clans, he was certain that it would enrage the Sultan and war followed. Muhammad hoped that the result would be the same as the last time, humiliating the Sultans troops and Constantinople with in reach. As Prussia remained neutral and both Britain and Austria had declared support for the Ottomans, Muhammad tried to bargain the French in supporting them. On 30th January the French gave full support to the Egyptians.
Ibrahim was sent to Halab and command the offensive against the Ottomans. He knew that the Ottomans were unprepared for war, and was certain that he could humiliate the sultans armies once again. Under his command an infantry division marched towards Diyarbakr and ordered other troops to advance to Adana, Kaf and Ar Ruthbar. As the Ottomans were caught off guard the advance went quickly and without much bloodshed.
The Egyptian offensive went according to plan and Ibrahim ordered his Southern troops to march towards Hillah and from there to Baghdad. As the Egyptian troops started to move on from Ar Ruthbar, the Ottoman cavalry charged into them, causing heavy casualties within the Egyptian ranks. The same faith was shared by the Egyptian troops stationed in Kaf. The survivors retreated to Hillah where they were encircled and awaited the oncoming Ottoman assault.
’
The battle of Hillah
Ibrahim didn’t hear about the situation in Hillah and assumed everything went according to his plan. Resistance of the Ottomans grew, after the initial gains the Egyptian offensive halted as Ottoman troops marched towards the Egyptians. Diyarbakr was sieged by Ottoman artillery, but the following assault was successfully repelled by the defending Egyptians.
In Cairo Muhammad Ali saw what happened in the Middle East and was quick to realize that if Ibrahim didn’t fall back he would be cut off from Egyptian homelands. And in November that was exactly what happened when Beirut fell to the Ottoman cavalry. Although one attempt to restore the link between Syria and Egypt and cutting off the Ottoman cavalry, this attempt failed horribly. With the offensive in Libya halted and pushed back, Crete occupied and Ibrahim cut off things started to look grim for the Egyptians.

Splitting the Egyptians
All this information was unknown to Ibrahim, but when the troops in Adana had fallen back to Alexandretta he started to worry. Unknown to him was that he was completely cut off from supplies when Akra fell. Continuing to sacrifice men in useless offensives, he weakened himself further and in mid 1839 the Ottomans launched an assault against Diyarbakr, finally capturing the city founding it deserted as Ibrahim and his troops had fled to Urfah. As Ottoman troops closed in on his position Ibrahim put up one final battle by attacking the Ottomans as they were preparing to siege the city. During the battle Ibrahim was wounded and eventually captured by Ottoman troops. Shortly after his capture the remaining Egyptian troops surrendered to the Ottomans.

Ibrahim encircled
Upon hearing the news of his sons capture and the Egyptian forces defeated, Muhammad fled Cairo. Ottoman troops were advancing on towards Cairo and with a large part of the Egyptian fleet and army destroyed. Muhammad begged the French for help, but as the French were afraid for British reprisals, no French help came. And on 5 December, 1840, Muhammad signed a peace treaty in which he returned all Arabic lands back to the Ottoman Sultan.

The Middle East after peace was concluded