New Jersey's attorney general immediately halted all municipal prosecutions of marijuana offenses Tuesday, effectively placing on hold thousands of cases across the state that involve possession of the drug while lawmakers continue to debate its legalization.

In a memo sent to county and municipal prosecutors, Attorney General Gurbir S. Grewal announced that he will issue a directive by the end of next month on whether to decriminalize marijuana, ending criminal penalties for simple possession of small amounts.

In Philadelphia and more than 50 other cities and towns across the country, possession of marijuana leads to small civil fines or community service. In New Jersey, an estimated 25,000 people are arrested each year on minor marijuana charges, which can carry a maximum six-month jail term and up to $1,000 in fines.

Grewal's decision was prompted by a memo that Jacob Hudnut, Jersey City's chief municipal prosecutor, sent to his municipal prosecutors on Thursday ordering the decriminalization of all marijuana-related cases in the city. Hudnut, who was recently sworn into office, said he did this in the interest of social justice, noting that three times as many minorities are prosecuted for marijuana possession than whites.

On Friday, Grewal reprimanded Hudnut, saying Hudnut had no legal authority to call on prosecutors to refrain from pursuing criminal action in marijuana cases. Grewal's reaction came as a surprise, because Gov. Murphy has said he would support legalization and has frequently cited the social injustice of marijuana enforcement.

But on Tuesday, Grewal ordered prosecutors to delay all municipal marijuana cases until at least Sept. 4 so that he could take a closer look at decriminalization. He said that he will include Hudnut and representatives of law enforcement and civil rights groups in discussions to potentially revise guidelines.

Hudnut said adjourning the cases was a bold decision. "I am excited to work with him in the weeks ahead on this issue," he said.

State Sen. Nicholas Scutari (D., Union), who has advocated for marijuana legalization for a decade, was buoyed by Grewal's action.

"This will give us added momentum," he said, adding that he plans to reintroduce a legalization bill, weeks after he was unable to win support for a bill that would allow recreational marijuana for adults and also make improvements to the medical marijuana program.

"We're all of the mindset we should get this done before the summer ends, and I appreciate the Murphy administration and the attorney general's efforts to back our efforts. Sometimes legislators need a kick to get this done," said Scutari, a municipal prosecutor in Linden.

Murphy campaigned last year on a pledge to support legalization, but so far no bills that would allow recreational marijuana for adults have made it to the floor. Some lawmakers favor outright legalization, while others say they would prefer decriminalization or making marijuana possession a civil offense subject to fines and community service.

Amol Sinha, executive director of the ACLU of New Jersey, said he is pleased that the attorney general is "saying, 'Let's hit the pause button,' on marijuana enforcement" because the racial justice issue must be addressed. "It makes sense that prosecutors across the state should do whatever they can to undo the harms of marijuana enforcement," he said.

Evan Nison, executive director of the pro-legalization group NORML NJ, said Grewal's decision will "at least delay and may completely prevent thousands of unfair prosecutions. These offenses can follow people around for their entire lives and make it more difficult to get a job or college education."

One year ago, Camden City Council also considered taking up a decriminalization policy similar to Jersey City's. At the time, Councilman Angel Fuentes said that he would call for an ad hoc study and that he hoped the change could be made in the fall. But without explanation, the matter was dropped a few weeks later and never came up for a vote.

In Philadelphia, a decriminalization bill was adopted in 2014. It calls for a $25 fine for possession of less than 30 grams of marijuana, or just over an ounce. In some circumstances, the law allows police officers to use discretion and to impose criminal citations that could lead to up to 30 days in jail and $500 in fines.

Philadelphia District Attorney Larry Krasner now declines charges for anyone arrested with a small amount, 30 grams or less, intended for personal use, according to a statement provided Tuesday by his office. His office still prosecutes cases of marijuana possession with intent to distribute.

Staff writer Sam Wood contributed to this article.