Muhammad Ali was of paternal Albanian descent; his paternal uncle was Mustafa Pasha.
After Muhammad's promising success in collecting taxes, he gained Second Commander rank under his cousin Sarechesme Halil Agha in the Kavala Volunteer Contingent that was sent to re-occupy Egypt following General Napoleon Bonaparte's withdrawal.