In 1805, Muhammad Ali became the Pasha of Egypt as a result of