Gov. Andrew Cuomo warned that New York can’t get too greedy in taxing recreational marijuana because residents could then easily cross the border to get cheaper weed.

Massachusetts imposes a 20 percent taxes on pot sales — a 10.75 percent excise tax, 6.25 percent sales tax and a 3 percent local tax.

New Jersey is still crafting its law.

Gov. Phil Murphy initially sought a 25 percent tax, which lawmakers want to cut to 12 percent.

“I want to make sure our framework is consistent with New Jersey and Massachusetts,” Cuomo said on WCNY’s “Capitol Pressroom” on Thursday.

He said the price for pot “can’t be so [much] cheaper” in neighboring states.

“We can’t have a system where we drive people, pardon the pun, to New Jersey,” said Cuomo.

And on the day Mayor Bill de Blasio unveiled his own views about legalizing weed, the governor made it clear the state is calling the shots.

“New York City can’t legalize marijuana, Buffalo can’t legalize marijuana … You need a state law, you need a state framework … No city or county can make a law that is applicable,” the governor said. “There are many opinions. We will listen to all of them.”

Cuomo, for example, noted that some county officials opposed to pot legalization want to opt out of the program.

The governor also shot down ideas to dedicate pot revenues to a specific cause — such as mass transit.

“There are no dollars that come to the state that we earmark,” he said, with few exceptions, such as the state lottery.

“We have a lot of desperate needs. We have health care needs, education needs, mass transit needs we haven’t had before … There will be many more needs at the end of the budget process that we can satisfy,” he said.

Cuomo will submit his marijuana legalization plan to the Legislature early next year.