Sen. Dianne Feinstein studies her notes during a hearing of the Senate Judiciary Committee on April 19. (Win McNamee/Getty Images)

Sen. Dianne Feinstein (D-Calif.) no longer opposes the legal use of marijuana, she told McClatchy in an interview on Tuesday.

“Federal law enforcement agents should not arrest Californians who are adhering to California law,” said Feinstein, who is facing a challenge in the Democratic primary from state Sen. Kevin de León.

The senator, a longtime opponent of legalization who has been called “California’s last prohibitionist” by Leafly, a pro-cannabis website, changed her views after meetings with constituents, her office said.

California, which is one of nine states that allow recreational marijuana use, along with the District of Columbia, voted to legalize in 2016, via Proposition 64. Feinstein was strongly opposed at the time, although she supported medical marijuana use. Citing her time on the California parole board in the 1960s, Feinstein told an Associated Press reporter that marijuana is a gateway drug. She said Prop 64 did not do enough to protect young people and motorists.

On Tuesday, she told McClatchy, “My state has legalized marijuana for personal use, and as California continues to implement this law, we need to ensure we have strong safety rules to prevent impaired driving and youth access, similar to other public health issues like alcohol,” she said.

Although states have made their own rules for recreational and medical marijuana, Attorney General Jeff Sessions in January wrote a memo that rolled back Obama-era guidance that federal laws not be enforced in the states that had legalized recreational use. Sen. Cory Gardner, a Republican from Colorado, which legalized pot in 2014, led efforts on a bill that would give decision-making power back to the states.

Feinstein told McClatchy she needed to review the bill before she could comment but was open to supporting it.

She would be a significant ally because of her position as the ranking Democrat on the Senate Judiciary Committee; she has worked closely with committee Chairman Charles E. Grassley (R-Iowa), on previous drug legislation.

Read more:

Trump, Gardner strike deal on legalized marijuana, ending standoff over Justice nominees

Opinion: Why Sessions’s marijuana crackdown is going to make legalization more likely

Wealthy San Francisco residents to get private street back, despite skipping taxes for decades

An NFL running back says he needs one thing to continue his football career: weed