 The Adriatic port city of Bari, in the Apulia region of southern Italy, was captured by a Muslim army in 847, then remained under Muslim control for the next 25 years.It became the capital of a small independent Islamic state with an emir and a mosque of its own.The first ruler of Bari was Khalfun, a Berber leader who had probably come from Sicily.