In 1744, the Emirate of Diriyah established in the area around Riyadh rapidly expanded and briefly controlled most of the present-day territory of Saudi Arabia, sacking Karbala in 1802, and capturing Mecca in 1803. In 1818, it was destroyed by the Ottoman viceroy of Egypt, Mohammed Ali Pasha. The much smaller Emirate of Nejd was established in 1824. Throughout the rest of the 19th century, the Al Saud contested control of the interior of what was to become Saudi Arabia with another Arabian ruling family, the Al Rashid, who ruled the Emirate of Jabal Shammar. By 1891, the Al Rashid were victorious and the Al Saud were driven into exile in Kuwait.