By 1704, the population of Ballymena had reached 800. In 1707, the first Protestant (Church of Ireland) parish church was built. In 1740, the original Ballymena Castle burned down. The Gracehill Moravian settlement was founded in 1765. During the 1798 rebellion, Ballymena was occupied from 7 to 9 June by a force of around 10,000 United Irishmen. They stormed the market hall, killing three of its defenders.