SPRINGFIELD, Ill. — The Illinois Senate has voted to approve the use of marijuana for medical purposes, which if signed into law would make it the second-most-populous state in the nation after California to allow the drug for such uses.

The bill, approved on Friday, now moves to Gov. Pat Quinn’s desk to await his signature. Mr. Quinn has indicated he is sympathetic to the bill, especially because it would benefit injured veterans.

“We fully expect Governor Quinn to do the compassionate thing and sign the bill,” said Dan Riffle, deputy director of government relations for the Washington-based Marijuana Policy Project.

The Illinois bill passed by 35-21 after an emotional, hourlong debate in which some Republicans said they opposed legalizing medical marijuana because it could lead to abuse of other illegal substances.