A bill to diversify Maryland’s medical marijuana industry received final approval in the state Senate on Wednesday — after a similar effort to bring in more minority-owned businesses faced a bitter defeat in the final minutes of last year’s session.

About one-third of Maryland residents are African American, but none of the 14 companies that have lucrative licenses to grow medical marijuana are led by black executives. The bill would increase the number of licenses for growers and processors, and it specifies that those licenses will be awarded in a process that gives preference to minority-owned businesses.

“For generations, African Americans have been disproportionately affected by marijuana laws,” said Del. Cheryl D. Glenn (D-Baltimore City), the bill’s sponsor. “To have this industry up and running without African Americans and other minorities involved as owners is shameful.”

But the bill — which was amended by the Senate Finance Committee last week — would also designate new processing licenses for several companies that already have growing licenses, a provision the bill’s critics say provides an unnecessary boon to wealthy companies. It would also award licenses to the two companies that sued the state because they say regulators illegally rejected them in favor of lower-ranking applicants — that provision is opposed by some lawmakers who say legislation should not be used to settle legal matters.

“It does what it set out to do in terms of trying to increase diversity, but, like any good Christmas tree, it has a lot of other ornaments on it,” said longtime lobbyist Gerry Evans, who represents Holistic Industries, one of the two lower-ranking companies that were awarded licenses instead of the pair that filed suit.

Members of both chambers will have to agree to changes made in the Senate before the bill is sent to Gov. Larry Hogan’s desk. Senate President Thomas V. Mike Miller Jr. (D-Calvert) told reporters Wednesday that he discussed the bill with House Speaker Michael E. Busch (D-Anne Arundel) and thinks it will pass. A spokeswoman for Busch confirmed he supports the legislation.

“We both determined that what happened last year, the bill died on the last night of the session in the House, is not going to happen,” Miller told reporters.

Senate Minority Leader J.B. Jennings (R-Baltimore County), who voted against the bill, said there should be an investigation into why the two companies that are suing Maryland were bumped. He also said the state needs to more carefully consider the size of the market before awarding new licenses.

“We don’t know what happened, and now we’re passing legislation to bring those two companies back in,” Jennings said. “To me, it’s a very dirty way of doing business.”

Vicky Ivory-Orem, an African American judge in Prince George’s County whose application for a growing license was rejected, said she had watched the bill progress with “mixed emotions.” She said she appreciated that minorities would be given another opportunity to compete for licenses but wondered why some of the new processing licenses were reserved for those who are already winners in the current system.

“It’s an all-white male industry, and it’s a billion-dollar industry,” Ivory-Orem said. “It’s not just people who can afford lobbyists or go knock on a senator’s door who should be able to partake — I’m not sure this bill fixes this.”

But Glenn said the bill is fair and that awarding additional processing licenses to growers will reduce the cost of producing the drug, pushing down the price to consumers. When the first dispensaries opened in December, prices were several times the cost in states such as Colorado, California, Washington and Oregon.

“It’s all about benefiting the patients,” said Glenn, who is registered with the state’s medical marijuana program and whose mother — after whom the marijuana-regulating commission is named — died before she could use the drug to alleviate her cancer symptoms.