Vermont Sen. Bernie Sanders followed his stop in the Bay Area over the weekend with endorsements Monday of a state ballot measure that would lift restrictions on residential rent control and a progressive Assembly candidate running against a fellow Democrat for an open East Bay seat.

The independent senator and 2016 Democratic presidential candidate gave thumbs ups to Proposition 10, which polls show is facing longshot odds Nov. 6, and Jovanka Beckles, a Richmond City Council member and youth mental health counselor who is running for an open seat in Assembly District 15, which stretches from north of Richmond into Oakland.

Sanders said Prop. 10 is needed to address the affordable-housing crisis and protect renters from skyrocketing prices.

“Municipalities should have the freedom to implement legislation to deal with the outrageous decline in affordable housing and rising rents,” Sanders said in a statement. “In that regard passing Proposition 10 makes sense to me.”

Under the Costa-Hawkins Rental Housing Act — which the ballot measure seeks to repeal — cities can’t cap rents on any housing built after the law passed in 1995. The restriction extends further back in cities such as San Francisco that had rent control when the law took effect. The law bars cities from capping prices when a unit becomes vacant, allowing landlords to raise rents as much as they like when a tenant leaves.

The Costa-Hawkins law also says cities cannot impose rent control on single-family homes. Under Prop. 10, local governments could decide what kind of rent control is appropriate for their cities.

The Assembly race in which Sanders issued an endorsement features Beckles running against Buffy Wicks, who directed Hillary Clinton’s California presidential campaign in 2016 and worked in Barack Obama’s White House on passing the Affordable Care Act.

Sanders’ endorsement of Beckles came two days after he appeared onstage with her at the Berkeley Community Theater during a rally in which he largely steered clear of state issues and races and focused on attacking President Trump.

“While in Berkeley, I had the chance to meet with Jovanka Beckles, and I was impressed by her commitment to progressive values,” Sanders said Monday. “In the state Assembly, she will fight for Medicare for all, a living wage for all California workers, environmental justice and criminal justice reform.”

Melody Gutierrez is the San Francisco Chronicle’s Sacramento bureau chief. Email: mgutierrez@sfchronicle.com Twitter: @MelodyGutierrez