LAS VEGAS (KLAS) — A bill that would allow doctors to prescribe life-ending medication terminally ill patients received final approval Wednesday in the Nevada Legislature.

Lawmakers meeting in Carson City approved Senate Bill 239 (SB239) — allowing use of the so-called “end-of-life pill.” The legislation has passed votes by the narrowest margins of any bill winning approval this session: It barely made it out of committee in the Senate on a 3-2 vote before passing 11-10 in the full Senate in April, and a 23-9 vote today in the full Assembly.

The bill now advances to the desk of Gov. Joe Lombardo, who has not indicated if he will sign it.

Patients would have to be older than 18 and diagnosed with a terminal condition by two doctors. The patient would also have to be determined to be mentally competent. The patient would have to make two verbal requests for the medication and a written request signed by a witness.

SB239 goes to great lengths to ensure the death is not described as a suicide, specifying that the terminal illness be listed as the cause of death. It also provides legal protections against prosecution or lawsuits for medical personnel involved in such cases.

Lawmakers did not meet into the night on Wednesday but still have a long list of bills to consider on Thursday and Friday. Here are some of the 53 bills that received final approval on Wednesday:

ELDER EXPLOITATION: The Assembly passed SB61 on a 42-0 vote, specifying that a joint bank account doesn’t give someone the right to take their parent’s money.

COUNTING VOTES: The Assembly passed SB404 on a 28-14 vote, allowing votes to be counted on or after the first day of early voting — no longer requiring officials to begin counting votes only after the arrival of Election Day.

RAILROAD SAFETY: The Senate passed AB456 on a 13-8 vote, requiring the use of safety monitors to detect overheated railroad equipment, and also limiting the length of trains to 7,500 feet. The bill came in response to the rail disaster in East Palestine, Ohio, when a derailment caused a toxic fire and a massive evacuation.

ELECTION DEADLINE: The Senate passed AB394 on a 14-8 vote, requiring the Secretary of State’s Office to adopt a procedure to be used if election results are not delivered before the established deadline. The bill also specifies that the counting of ballots may be performed only once, requiring a formal recount as the exception.