The debate over marijuana across America has evolved over the years, in light of wide racial and socioeconomic disparities in arrests and prosecution of recreational marijuana use, as well as a diverse range of voices in health care that have studied the substance’s effects on its users.

New York should chart a path toward legalization — but take heed of the public-health impacts of habitual, recreational use as well as the possible challenges to public safety.

For instance, researchers at Mount Sinai’s Center for Addictive Disorders have found that while medical marijuana reduces anxiety, inflammation and pain, recreational use can affect judgment and decision-making, impede concentration and weaken memory. It can also be highly addictive and lead to tolerance, requiring users to take more of it to feel its effects.

This is a critical public-health issue for communities that have endured decades of economic disadvantage and disparities in access to health care services.

A legal marijuana market requires setting stringent health standards, just like recommended dosages for alcohol and warning labels for cigarettes. Without these kinds of advisories and protections, we risk exposing our communities to lifelong health damage, which could also lead to an increasing burden on our health care system.

There must be a clear delineation between medical marijuana prescribed by a physician and recreational use that is merely for enjoyment, which is sold on the street or through third parties.

We cannot have legalization lead down a path toward irresponsible use of marijuana that exacerbates health disparities in poor, urban communities of color.

It’s also well-documented that these communities are disproportionately impacted by the prosecution of marijuana use. As a recent New York Times investigation revealed, black people have been arrested on low-level marijuana charges at eight times the rate of white people just in the last three years, with arrests occurring at alarmingly higher rates in black rather than white neighborhoods.

That kind of stark disparity must be rectified through the elimination of arrests for possession and sale of the substance. However, public safety must remain a central focal point in these discussions.

For starters, we cannot replace arrests with a criminal summons that would allow a bench warrant to be issued if the summons is unpaid.

My law enforcement experience has showed me first-hand the violent and psychologically scarring impact that can result from the series of dominoes that fall after an otherwise law-abiding citizen fails to pay a summons for a quality-of-life offense on time.

The real repercussions of a permanent criminal record — some lose their jobs, their housing, even their families — can go far beyond the primary policing objective.

A civil summons would be appropriate, like that issued for the unlawful consumption or possession of alcoholic beverages. Additionally, we need systems in place that ensure users of marijuana do not endanger others, while driving or operating machinery.

There must be proper testing, such as Breathalyzers or urine tests, to ensure marijuana’s disorienting effects can be properly monitored.

We must empower disadvantaged communities to actively participate in a newly regulated market that would eliminate racial and socioeconomic disparities.

Licensed vendors should be able to open new establishments in disadvantaged communities through the promotion of local entrepreneurship, particularly in communities of color.

Community members and business owners can be trained through public and private investments in social programs that teach entrepreneurial skills through which vendors can gain licenses in a regulated marketplace that is estimated to be worth $3.1 billion in New York state alone, of which $1.1 billion is in the five boroughs, according to a recent report compiled by the City Comptroller’s Office. That can be a real boon to economic development by creating new wealth at the grassroots level in communities lacking capital.

The road to marijuana legalization should not be a license for a “Wild West,” unregulated marketplace where anyone can buy or sell the product without enforcement or oversight.

There must be mechanisms in place that ensure the public is protected from recreational marijuana’s harmful effects as well as creating truly meaningful pathways for historically disadvantaged and persecuted communities to be uplifted out of the shadows and into the bright light of a new economic and social opportunity for themselves, their families and the communities in which they live.

Eric L. Adams currently serves as Brooklyn’s borough president.