About 1130, Henry I granted a sheriff to the people of London, along with control of the county of Middlesex: this meant that the two entities were regarded as one administratively (not that the county was a dependency of the City) until the Local Government Act 1888. By 1141 the whole body of the citizenry was considered to constitute a single community. This 'commune' was the origin of the City of London Corporation and the citizens gained the right to appoint, with the king's consent, a mayor in 1189—and to directly elect the mayor from 1215.