Six Cape-based medical marijuana nonprofits received permission from the state Monday to move forward to the final permitting phase.

But the state Department of Public Health rejected two applicants who wanted to open medical marijuana dispensaries in Barnstable County.

Statewide, there were 181 applications for permits and 158 were approved for the final phase, which will include further review and a $30,000 nonrefundable application fee.

All four applicants for Martha's Vineyard and both applicants for Nantucket were approved for the final phase, according to the list from the DPH.

Those who passed muster include the Kingsbury Group, which wants to open dispensaries in Provincetown, Dennis and Martha's Vineyard, said Tim McCarthy, of Truro, one of the principals in the group.

Another successful applicant was Jane Heatley, of The William Noyes Webster Foundation, who already has property lined up in Dennis, said her attorney, Valerio Romano, of Boston.

Heatley would not disclose the locations of her proposed dispensary or grow site, but they must be inside the town's industrial zone east of Route 134, she said.

The proposed locations are not listed in the public part of the application list.

In November, voters endorsed legalization of medical marijuana. The state will allow 35 dispensaries in this first year with no more than five per county.

So far Dennis is the only Cape town to pass a zoning regulation restricting dispensaries to the industrial zone of town with a special permit from the planning board.

Some towns — including Orleans, Barnstable, Sandwich and Yarmouth. — have moratoriums prohibiting dispensaries for now. Mashpee and Harwich voters also approved moratoriums, but State Attorney General Martha Coakley has not issued final approvals on those two yet, according to her office.

Bourne town meeting will consider a moratorium at an October special town meeting.

Those bans will all expire at varying times next year.

Coakley has ruled that no town can ban dispensaries outright.

Heatley, a resident of Barnstable Village who has lived on the Cape 40 years, set her sights on Dennis because the zoning issues have already been worked out, Romano said. She hopes to win final approval at the end of this year, her attorney said.

Then it will take time to renovate the properties "and grow the medicine," Romano said.

At the earliest, Heatley's dispensary could open in the middle of next year, he said.

Heatley, who owned a company related to real estate titles for 39 years, became interested in medical marijuana after watching two close friends suffer from cancer. Both her parents were hospital administrators and managers.

"So I have been around medicine my whole life," she said.

She does not think the marijuana she sells will be abused because the state law requires those with medical marijuana certification to have an established relationship with the approving doctor.

"I know that's been a problem in other states, but I don't think it will be here," she said.

The two Cape applicants rejected by the DPH were Medisand Inc., which has a contact listed as Robert Anderson, and Cape Cod Alternative Medicine, whose board members included former Brewster Police Chief James Ehrhart and former county commissioner Mary LeClair.

Ehrhart said his group couldn't secure the $500,000 in operating capital listed as necessary in the application process.

Despite the moratoriums, the dispensaries could end up in any town, Romano said.

As part of the final review phase, the state will look to spread out dispensaries so patient access to marijuana is evenly distributed, he said.

Phase 2 applications will go before a selection committee. They will be "scored on such factors as ability to meet the health needs of registered patients, appropriateness of the site, geographical distribution of dispensaries, local support, and ensuring public safety," according to a press release from the DPH.