The Funj Sultanate, also known as Funjistan, Sultanate of Sennar or Blue Sultanate, was a monarchy in what is now Sudan, northwestern Eritrea and western Ethiopia. Founded in 1504 by the Funj people, it quickly converted to Islam, although this conversion was only nominal. Until a more orthodox form of Islam took hold in the 18th century, the state remained an "African empire with a Muslim façade". It reached its peak in the late 17th century, but declined and eventually fell apart in the 18th and 19th centuries. In 1821, the last sultan, greatly reduced in power, surrendered to the Ottoman Egyptian invasion without a fight.