The key to victory may lie in southeastern Queens, which represents about 40 percent of the electorate and has a large number of black voters, according to Politico.

The candidates are:

Melinda Katz: The Queens borough president has accepted donations from the real estate industry. She said she would target hate crimes and housing fraud. Governor Cuomo and the Queens Democratic machine have endorsed her.

Gregory Lasak: He is a former judge and senior prosecutor who has support from law enforcement unions. He oversaw numerous murder investigations; in the 1980s, he prosecuted officers in a police brutality case.

Betty Lugo: She is a former prosecutor in Nassau County and was the president of the Puerto Rican Bar Association in New York.

Rory Lancman: He dropped out and endorsed Ms. Katz.

Jose Nieves: He has prosecuted correctional officers, police officers and military service members. He has worked in the Brooklyn district attorney’s office, the Civil Rights Bureau of the state attorney general’s office, and the Army Judge Advocate General’s Corps.

Tiffany Cabán: She is a public defender and has relied on small-donor donations from outside of New York. Senators Elizabeth Warren and Bernie Sanders and Representative Alexandria Ocasio-Cortez have endorsed her. She wants to decriminalize sex work, end the prosecution of drug use and end the use of cash bail, even in cases involving violence.

Mina Quinto Malik: She led the Civilian Complaint Review Board and was a deputy attorney general for Washington, D.C.