Physician-assisted suicide is about to become legal in the nation's largest state.

The California End of Life Option Act takes effect on Thursday. The law allows terminally ill adults in California with less than six months to live to get a doctor’s prescription for a lethal dose of “aid-in-dying” drugs.

Gov. Jerry Brown signed the legislation in October after it cleared both houses not without with some opposition from lawmakers.

The law makes California the fifth state to legalize doctor-assisted dying. Oregon, Vermont and Washington have enacted similar "end of life" measures. Montana's highest court in 2009 ruled that physicians who provide "aid in dying" are shielded from liability.

In most Western countries, physician-assisted dying remains a criminal offense.