Illinois Gov. J.B. Pritzker signed legislation on Sunday that raises the legal age for purchasing cigarettes, e-cigarettes and other tobacco products from 18 to 21.

The new law takes effect July 1. It aims to reduce tobacco use among teens and young adults by preventing them from starting, said Pritzker and state lawmakers who attended Sunday’s bill signing.

Statistics show that most smokers start as teenagers, and the younger they are when they start, the more likely they’ll become addicted.

With the signing, Illinois joins a growing list of states and municipalities raising the age for tobacco, amid growing concern about the rise of vaping among teens.

Washington’s governor on Friday signed legislation raising the age to 21. The New York Senate passed similar legislation on April 1.

Chicago raised the age in 2016 for purchasing tobacco, in what Pritzker called a model for the statewide legislation.

Chicago Mayor Rahm Emanuel, who attended Sunday’s signing, said raising the age contributed to reductions in youth smoking in the city.

Pritzker cited statistics showing that tobacco use is on the rise among youth, driven largely by e-cigarettes. The new law would help reverse the trend, he said.

“We’re dealing with an old problem in a new form,” Pritzker said.

“And while all our residents have the right to make this choice for themselves, we need to be realistic about what that choice means for our young people.”

His predecessor, Gov. Bruce Rautner, vetoed a similar measure, saying it would limit consumer choice and drive people to other states or non-licensed vendors for purchases.

Pritzker dismissed concerns that the legislation would hurt businesses by depriving them of revenue.

He called on neighboring states to pass similar laws to discourage people from crossing state lines. The new law does not include penalties for underage possession, but businesses face fines and sanctions for selling to consumers under 21.

A March 2015 report by the Institute of Medicine — now called the National Academy of Medicine — concluded that raising the age would save lives and lead to better public health outcomes.

The report found that increasing the age reduces tobacco initiation among 15- to 17-year-olds, leading to reductions in smoking prevalence.

Representative Camille Y. Lilly, who sponsored the Illinois legislation, said it would save billions of dollars in health care for generations to come.

The law makes it harder for 18-year-olds to act as “suppliers” for younger teens, she said.

“It takes health care to make America better,” she said. “This piece of legislation brings us forward.”