Hamilton, a local district leader, secured 64.9 percent of the vote in the three-way race for the seat, according to The New York Times.
With no Republican in the running, Hamilton will become the next state senator for the district, which covers parts of Sunset Park, Gowanus, Park Slope, Crown Heights and Brownsville. The position was previously held by Eric Adams, who is now Brooklyn's borough president.
"Tonight’s results clearly show that voters in this district demand a proven progressive who will continue Borough President Eric Adams’ long legacy of delivering for our neighborhoods — and I’m proud to answer the call," Hamilton said in a statement after the win Tuesday.
Hamilton's chief rival in the race, attorney and former Department of Education administrator Rubain Dorancy, garnered 29.9 percent of the vote.
Both contenders raised more than $100,000 during the close campaign and boasted big-name endorsements. Mayor Bill de Blasio and the health care union 1199 SEIU endorsed Dorancy. Hamilton, who served as the district leader in the nearby 43rd Assembly District for nearly a decade, picked up support from the service employees union Local 32BJ and Adams himself, who left the Senate seat at the beginning of the year.
A third Democratic candidate, Guillermo Philpotts, received 5.2 percent of the vote.