ALBANY, N.Y. (AP) — New York is set to become the 23rd state to legalize medical marijuana under an agreement announced by legislative leaders.

 Shortly after midnight Friday, Senate Majority Leader Dean Skelos said the bill will be voted on later in the day when Republican lawmakers have reviewed the legislation.

 Skelos, who is from Long Island, says he will be voting on the legislation and believes there are enough votes to pass the bill in the upper chamber.

 The so-called Compassionate Care Act would legalize certain forms of marijuana for severely ill patients. The legislation does not allow the drug to be sold in plant form or smoked, but it can be administered through a vaporizer or in an oil base.

 The Democratic-led Assembly passed the legislation early Friday.