Acting Brooklyn District Attorney Eric Gonzalez will become the first Latino to officially hold the office.

He beat back five challengers to win 50 percent of the vote in Tuesday night's primary election.

Nobody else got more than 11 percent.

Since there's no Republican in the race, Gonzalez will be the new DA.

The 48-year-old says he will do his best to uphold his predecessor Ken Thompson's legacy.

"It's my promise to each and every one of you and to the people of Brooklyn that I will never forget the principles that served to guide me for 23 years in the D.A.'s office and have served to guide the principles of this campaign and have served to guide how we are going to keep the people of Brooklyn safe, but have true fairness in our criminal justice system," Gonzalez said.

Gonzalez has been the acting DA since Thompson's death from cancer last year.

The Williamsburg native was his hand-picked successor.