John DeStefano Jr. may have won his ninth election as New Haven’s mayor Tuesday night, but he is still not the city’s longest serving mayor.

The history archives at the New Haven Historical Society on Whitney Avenue show that Elizur Goodrich, a lawyer, politician and 1779 Yale College graduate, remains New Haven’s longest serving mayor: While DeStefano has been mayor for 15 years, Goodrich, the city’s third mayor, served in the post for 18 years and nine months.

DeStefano’s win Tuesday makes him New Haven’s longest serving elected mayor, but he will have to win an additional election in order to unseat Goodrich as New Haven’s longest serving mayor.

Goodrich is not New Haven’s longest-serving elected mayor because the state’s General Assembly technically appointed him to the post for successive year-long terms following his initial win in the election of 1803. He then served as New Haven’s mayor until June 1822.

While he was mayor, Goodrich also taught at Yale Law School, where he was a professor from 1801 until 1810, when he resigned because teaching interfered with his public duties, according to records kept by the Connecticut State Library.

Before becoming New Haven’s mayor, Goodrich won a seat to represent Connecticut in the sixth United States Congress in 1799, according to the online biographical directory of the United States Congress. Though he also won a seat in the seventh Congress, Goodrich resigned the post after President John Adams appointed him in 1801 as New Haven’s collector of the port. In this position, Goodrich managed the collection of import duties on foreign goods until he ran for mayor.

In the book “Yale College Biographical Sketches 1779,” which is currently housed at the New Haven Historical Society, Goodrich is commended for his contributions to both the University and the city. In addition to teaching law, Goodrich was a member of the Yale Corporation between 1809 and 1818 and was the Corporation’s secretary between 1825 and 1846.

After Goodrich resigned from office in June of 1822, Democrat George Hoadly succeeded him as mayor and held the post for only four years, according to William Richard Cutter’s book “New England Families, Genealogical and Memorial.”

After he died in New Haven in 1849, Goodrich was buried in the Grove Street Cemetery, according to Congress’ biographical directory.