Divers on Wednesday recovered the remains of two of the six workers missing since the crumbling bridge tossed them into the water
The law allows for the production and processing of cannabis, but does not regulate its recreational use.
Independent lawmaker Zoila Volio, who backed the law and called the move a milestone, said it would not open the floodgates to increased drug use in Costa Rica.
"I trust that President Alvarado has understood that and will not veto it," said Volio.
If Alvarado vetoes the law, lawmakers would need to again vote on it and approve it with a qualified majority.