The Maryland legislature approved the use of marijuana for medical purposes on Monday, and Governor Martin O'Malley has said he would sign the measure and make Maryland the 20th state to legalize medicinal cannabis.
The Democratic-controlled state Senate passed the bill by a 42-4 vote. The House of Delegates had approved it last month.
The measure allows seriously ill residents to obtain medical marijuana via state-regulated programs administered by academic medical centers.
O'Malley, a Democrat and seen as a potential presidential candidate in 2016 elections, has vowed to sign the bill into law.
Nineteen states and the District of Columbia allow the medical use of marijuana. Colorado and Washington last year became the first U.S. states to legalize the sale and possession of marijuana for recreational use.
A poll last week showed for the first time that most Americans backed legalizing marijuana.