Follow KDKA-TV: Facebook | Twitter

(CNN) — Smokers won’t be able to light up in or near public housing starting July 31.

READ MORE: Portion Of Washington Pike Closed Due To Downed Power Lines

They’ll still be allowed to rent in the communities but will have to keep lit cigarettes, cigars and pipes at least 25 feet away from buildings. Electronic cigarettes will still be permitted.

The policy was announced two years ago by the Department of Housing and Urban Development, but the agency gave the nation’s more than 3,300 local public housing authorities nearly two years to begin enforcement.

The rule will be part of residents’ leases — along with information about how to quit smoking — and tenants who break it could be evicted, HUD has said. But eviction after just one violation “is not grounds for eviction,” and smoking on public housing premises is a civil violation, not a crime, the agency said in setting guidelines for local enforcement.

READ MORE: Tunch And Wolf's Walk For The Homeless In-Person Celebration Scheduled For June 13

The federal ban will save public agencies an estimated $153 million every year in costs related to health care due to secondhand smoke, as well as repairs and losses from preventable fires, according to the Centers for Disease Control and Prevention.

The ban will affect more than 940,000 public housing units across the country, according to HUD. Through the agency’s voluntary policy and local initiatives, more than 228,000 public housing units were already smoke-free in 2016.

Along with promoting the health benefits of not smoking, HUD hopes the new rule will also “create healthy environments that encourage people who smoke to quit or attempt to reduce smoking,” the agency says.

MORE NEWS: Children's Museum Of Pittsburgh Welcomes Visitors Back Inside

™ & © 2018 Cable News Network, Inc., a Time Warner Company. All rights reserved.)