Macquarie resigned at the end of 1821 because of poor health and the difficulty of the job. He served longer than any other governor. When he left 265 major works had been completed, including new army barracks, three convict barracks, roads to Parramatta, a road across the Blue Mountains, stables, a hospital and five towns along the Hawkesbury River, which were out of reach of floodwaters.