Some influential New Jersey mayors said Thursday they would withhold support for legalizing recreational marijuana unless the legislation also expunges prior convictions for possessing or distributing the drug.

The mayors of Newark, Jersey City and Hoboken also said they want people currently incarcerated for marijuana convictions to be released and made eligible for licenses to sell it. The three mayors, all Democrats, also want to authorize municipalities to decide how many licenses for selling marijuana to issue within...