 The mosque was completed in 1585–86.The mosque was commissioned in 1584 by the eunuch Mesih Mehmed Pasha while he held the post of third vizier.Mesih Pasha had worked for nearly six years in Cairo as the governor-general of Egypt before returning to Istanbul in 1581.