In 868 the Turk Ahmad ibn Tulun gained control of Egypt and gradually asserted his independence from Samarra.
By 868, the Turk Ahmad ibn Tulun seized power in Egypt and began to assert his independence from Samarra over time.