The 20 were chosen by the Department of Public Health out of 100 finalists. The dispensaries, which officials said could begin opening by the summer, will be allowed to grow and sell marijuana for patients with certain medical conditions including cancer, multiple sclerosis and Parkinson's disease.

The law, approved in November 2012, permits a maximum of 35 dispensaries in Massachusetts and requires that all 14 of the state's counties have at least one. But four counties — Berkshire, Franklin, Dukes and Nantucket — were not included in the first round of approvals.

Karen von Unen, director of the DPH's medical marijuana program, said eight other applicants that were deemed qualified but rejected because of their proposed locations will be invited to reapply in one of the four counties excluded from the initial license awards.

Applicants were first subject to background checks and screening for financial viability. Finalists were then judged by a selection committee on factors including appropriateness of site, local support, and ability to meet the needs of patients, according to public health officials.

"We weren't prepared to settle for anything less than a highly qualified applicant," van Unen said in a conference call with reporters.

Three of the licenses were awarded to the same company, Medical Marijuana of Massachusetts Inc. The firm's president is former U.S. Rep. William Delahunt, who served in Congress from 1998 to 2012.

Walpole Deputy Police Chief John Carmichael, a member of the selection committee, said politics played no role in the process.

The licenses are provisional, subject to municipal permits and final inspections. Officially to be known as Registered Marijuana Dispensaries, they will be required under state regulations to pay a yearly registration fee of $50,000.

"I'm very excited about the opportunity to help patients in Barnstable County," said Jane Heatley, founder of the William Noyes Webster Foundation, which won a license to operate one of two Cape Cod dispensaries.

Because her group has already secured permits from the town, Heatley said the facility could open within five months and is currently hiring staff experienced with medical marijuana operations in other states.

Some facilities could take longer to begin operations. For example, Healthy Pharms, Inc., which was awarded a license in Haverhill, is still awaiting approval of zoning regulations from the city, according to Valerio Romano, a lawyer who represents the company and several other groups awarded licenses.

Matthew Allen, head of the Massachusetts Patient Advocacy Alliance, expressed concern that dispensaries would not initially be located in rural Berkshire and Franklin counties, but agreed that DPH should only award licenses to the strongest applicants.

Prospective medical marijuana patients hailed news that the drug would soon be legally available, including Allison Jones, 60, who suffers chronic pain from severe injuries sustained in an accident four years ago and said she cannot tolerate prescription medications.

"Medical marijuana helps me deal with the nausea, the pain and the muscle spasticity," said Jones, a nurse from Rutland. "It's made me able to get my life back."

Massachusetts is among 20 states that allow for medical marijuana use, but many doctors remain skeptical.

"Patients should remember that marijuana lacks the rigorous testing of drugs approved by the Food and Drug Administration; that claims for its effectiveness have not been scientifically proven; and that it poses health risks of toxins and cognitive impairment, the last condition being especially risky for young patients," Dr. Ronald Dunlap, president of the Massachusetts Medical Society, said in a statement.

MAYOR WHO WOULD NOT SUPPORT THE RE-ELECTION BID. MEDICAL MARIJUANA SHOPS IN MASSACHUSETTS, A STEP CLOSER TO REALITY TONIGHT. 20 LICENSES AWARDED, TODAY, THREE OF THEM GOING TO FORMER BAY STATE CONGRESSMAN. IT IS SRGING FROM NORTH HAMPTON TO CAPE COD. OUR LIAM MARTIN IS LIVE IN NEWTON. ONE OF THE LOCATIONS ON THAT LIST. LIAM? MARY. RIGHT OFF WASHINGTON STREET RIGHT OFF THE PIPE. BY LATE BRING, EARLY SUMMER. THIS MACE WILL BE OPEN FOR MEDICAL MARIJUANA BUSINESS. AND SO IT BEGINS, THIS STOREFRONT IN NEWTON TO BECOME A MEDICAL MARIJUANA DISPENSARY BY THIS SUMMER. RESIDENTS HERE WITH MIXED REACTIONS. RIGHT NEXT TO A LIQUOR STORE, NOT A GOOD IDEA. THIS JUST ONE OF 20 DISPENSARIES APPROVED BY THE STATE FRIDAY. THEY ARE SPREAD ACROSS TEN OF THE STATE'S 14 ONTIES. THE STATE COULD APPROVE AS MANY AS 15 MORE IN THE COMING MONTHS. WE WANTED TO PREVENT ANY DIVERSION AND SOMETHING WE WERE LOOKING FOR AS PART OF THE PROCESS. THE DIRECTOR OF HE STATE'S NEW PROGRAM. SHE APPROVED THOSE 20 DISPENSARIES AND SAID THE FOCUSES WITH ON GEOGRAPHIC NEED, COMMUNITY SUPPORT AND THE STRENGTH OF THE PROPOSAL ITSELF. THE REAL TRAGEDY IS THAT POSITIONS AND OTHERS WHO WANTED TO ALLEVIATE THAT PAIN AND SUFFERING DID NOT HAVE THIS AS AN ALTERNATIVE. FORMER CONGRESSMAN WANTS THREE OF THOSE 20 LICENSES. HE DENIED ANY IN SEN UATION THAT THE! THE FORMER POWER PLAYED A ROLE. THIS WAS DONE AND IT WAS SCORE. THE INDIVIDUAL WHO ACTUALLY MADE THE DECISION, I HAVE NEVER MET THE WOMAN. MANY OF THE 20 LOCATIONS COULD OPEN THIS SUMMER AND THEN MAJOR CONCERN NOW TURNS TO KEEPING THE DRUGS WITH THE PEOPLE WHO NEED THEM. IT HAS ENDED UP IN THE HAPPENS OF YOUNG PEOPLE AND OTHERS FOR WHOM IT WAS NOT DESCRIBED. THERE WERE CLOSE TO 160 APPLICATION INITIALLY SO COMPETITION FOR THIS. STATE OFFICIALS EXPECT TO APPROVE ANOTHER FOUR TO SIX APPLICATIONS PIE LATE SPRING EARLY SUMMER INCLUDING THE FOUR