[What you need to know to start the day: Get New York Today in your inbox.]

Mayor Bill de Blasio is certainly not the only elected official who has been critical of efforts to legalize recreational marijuana, only to slowly change his position over time.

But Mr. de Blasio said that his gradual shift — memorialized on Thursday at a news conference where he announced his support for legalization, with some caveats — did not come simply because other states had done so, or because of the revenue it could bring.

The mayor said that his family’s experiences with addiction, including growing up with a father who was addicted to alcohol and cigarettes, compelled him to make sure that New York City took enough precautions before embracing legalization.

“You can’t take addiction lightly when you’ve seen it,” Mr. de Blasio said in Washington Heights.

The mayor’s father, Warren Wilhelm, lost his leg during battle in World War II. After Mr. Wilhelm was investigated for being a Communist sympathizer, his health deteriorated over the years while using alcohol.