Complex sentence: The church was converted into a mosque when the Sultanate of Rum acquired Antalya in the early 13th century, which was when the actual minaret was added.
Split into simpler sentences: The church was converted into a mosque when the Sultanate of Rum acquired Antalya. It was then when the actual minaret was added.