On July 1, businesses with the proper licenses can officially start selling recreational marijuana to anyone 21 years or older in Massachusetts. But the sale and use of marijuana carries a lot of restrictions, as well as resistance, depending on what part of the state you live in.

To break down the complexities packed into the recreational marijuana law, Morning Edition Anchor Joe Mathieu is sitting down with WGBH Legal Analyst Daniel Medwed each week leading up to the official opening of the industry. This week, Medwed explains the tactics local governments are using to ban recreational marijuana within their borders and how those decisions are reverberating across the state. This transcript has been edited for clarity.

Joe Mathieu: Many cities and towns have expressed opposition to the emergence of retail marijuana establishments. It's our new NIMBY activism, which we have seen in the context of other controversial businesses. How has this though translated, Daniel, into legal action?

Daniel Medwed: In several ways. First and foremost, more than half the cities and towns in Massachusetts have banned pot shops in their borders. For some cities and towns this has taken the form of an indefinite moratorium which is really designed to keep them out forever. In other places, it's just a temporary ban that is really buying time for the community to come up with its own local zoning ordinances or permitting requirements to figure out the best way to go forward.

Mathieu: We've seen this happen a lot of times already, Daniel, as we've discussed. How easy is it for municipalities to ban pot shops, and do residents have much of a say?

Medwed: It depends entirely on the outcome of the 2016 ballot initiative that initially legalized recreational marijuana use for adults over the age of 21 in the commonwealth. You might remember that the ballot initiative won by 53 or 54 percent of the vote. So when cities and towns that voted in favor of the ballot initiative, it requires a community vote to ban it. Sort of, there's a presumption of acceptance. However, in cities and towns that voted against the legalization of marijuana back in 2016, all that's required to institute a ban is that the local governing board of selectmen or city council, town council just has to implement it. What's more, even in communities that don't want to ban pot shops entirely, they could set up pretty intricate zoning and permitting requirements that could, to some extent, discourage shops from operating in those communities.

Mathieu: So let's say a city or town is theoretically open to the idea of a retail marijuana store. How easy is it to actually make that happen?

Medwed: Well, in addition to some of those hurdles I just mentioned, there are some affirmative obligations that they have. For one thing they have to hold a community outreach meeting. They have to have this public meeting with the community to allow the community to air grievances. And in addition they must reach what's called a host community agreement with the municipality that establishes and stipulates the rights and responsibilities of the various parties. So there are quite a few hoops to jump through.

Mathieu: I want to ask you about delivery services, because we've heard that many of them are operating now illegally in the state. Will companies be able to legally deliver pot to people's homes?

Medwed: The Cannabis Control Commission, which is the regulatory body that oversees this, has deferred a decision on home delivery until at least February 2019, citing among other things concerns about age verification requirements. We can envision a situation where teenagers dial up marijuana for home delivery and maybe the deliverers don't do a great job of checking out age requirements. So we have to wait and see about that one. Not unlike alcohol.

Mathieu: Aside from local action by local government, Daniel, are any private actions underway to keep retail marijuana stores out of a community?

Medwed: Well yes. This is the United States of America. And that means civil litigation. One property owner in Harvard Square — get this — has sued a medical marijuana dispensary nearby for declining property values. The suggestion here is that the presence of the dispensary has deflated the value of this person's property in Harvard Square. In addition, the property owner is alleging that this violates the federal racketeering statute.

Mathieu: Isn't the RICO statute you mentioned used in organized crime cases usually?

Medwed: That's right. Not the [Frank] Salemme trial here. It's quite amazing. I think the claim is that the dispensary is engaged in some form of organized crime, at least as it relates to federal law. Even though the state might sanction medical marijuana dispensaries, it's still technically illegal under federal law. So that's sort of the gist of the property owners claim here. We'll have to see how it plays out in federal court. We've got to stay tuned.

Mathieu: That's WGBH Legal Analyst and Northeastern Law Professor Daniel Medwed.