California Gov. Jerry Brown signed a bill Monday afternoon legalizing physician-assisted suicide for terminally ill patients, a reporter for the Sacramento Bee tweeted. The bill had been met with fierce opposition from advocates for the disabled and religious groups but had won legislative passage in September.

Although the measure was pulled in July because of a lack of support, it was reintroduced in August during a special legislative session dealing with healthcare issues and passed Sept. 11 in the state Assembly with a 43-34 vote as well as in the Senate with a 23-14 vote. Brown, a lifelong Catholic and former Jesuit seminarian, had not given many clues indicating whether he would end up signing the bill or vetoing it.

“ABx2 is not an ordinary bill because it deals with life and death,” Brown wrote. “The crux of the matter is whether the state of California should continue to make it a crime for a dying person to end his life, no matter how great his pain or suffering. … In the end, I want to reflect on what I would want in the face of my own death. I do not know what I would do if I were dying in prolonged and excruciating pain. I am certain, however, that it would be a comfort to be able to consider the options afforded by this bill. And I wouldn’t deny that right to others.”

Under the bill, two doctors have to determine that a patient has no more than six months to live before life-ending drugs can be prescribed, Reuters reported. The bill also requires that any patient interested in seeking such drugs to be mentally competent, present two separate requests to an attending physician and furnish two witnesses attesting to his or her desire to die. Doctors are also required to meet in private with the person desiring to die. The law expires after 10 years, requiring its reapproval.

Brown’s signature made California the fifth state in the nation to allow terminally ill patients to legally end their lives using doctor-prescribed drugs, according to the Associated Press, and at least two dozen other states introduced similar legislation this year. Oregon, Washington, Vermont and Montana already have right-to-die legislation.

A Gallup poll found 70 percent of Americans supported the physician-assisted suicide legislation, and this year the California Medical Association switched its position on the issue from being opposed to neutral. The bill was opposed by the Roman Catholic Church, disability-rights advocates and doctors who contend they should preserve life rather than end it.