Williamsburg was incorporated into Bushwick as the "Village of Williamsburgh" within the Town of Bushwick in 1827. After two years, it had a population of over 1,000, a fire department, and a post office. Its prime location on the East River encouraged industrialists to build shipyards around Williamsburg. As such, it became a hub of industry.
In 1840, Williamsburg separated from the Town of Bushwick and became the Town of Williamsburg. Edmund Smith Driggs, a Williamsburg resident, was elected the first president of the Village in 1850. Driggs Avenue is named after him. It became the City of Williamsburg (then discarding the 'h' in 1855 and was organized into three wards. Finally, in 1898 Brooklyn became one of the high boroughs within NYC and so Williamsburg became part of the City of Greater New York. The Williamsburg Bridge was opened shortly after.