Being stuck in the stink of an exhaust-spewing bus will, in a few years, be just a bad memory.

The state of Connecticut plans to end the reign of diesel-powered buses, replacing them with electric vehicles by 2035.

It’s a massive undertaking, requiring not only the replacement of the current fleet of buses, but the construction of recharging stations to power them up.

But the change is on the way. When the work is finished, it will mean cleaner air, cleaner lungs, and fewer cases of asthma and other pulmonary diseases.

“It will happen in five to 10 years,” said Richard Schreiner, chief executive officer of HARTransit, which provides bus service in the Danbury area. “I think it will happen on the low side of that period.”

“It’s very exciting,” said Katie Dykes, commissioner of the state Department of Energy and Environmental Protection. “It can’t come a moment too soon.”

Gov. Ned Lamont signaled the state’s commitment to an all-electric bus fleet in December, as part of an executive order on a wide range of environmental issues.

On that order, Lamont instructed the state Department of Transportation to stop buying, or providing funding for, diesel-powered buses by the end of 2023.

The DOT and some cities are already moving in that direction. There are two electric buses operating in Bridgeport and one in New Haven with more on the way.

The state is also using $12.7 million of its $55.7 million settlement with Volkswagen to buy 43 electric school buses, to be uses is seven communities, including Bethel and Stamford.

The DOT is studying how to use electric buses in other places.

Schreiner said the DOT will analyze the HARTransit area this year. The DOT report will provide a blueprint on how to proceed with electrifying its buses in the future.

Among the things to be worked out is how to pay for a new fleet. The upfront costs of electric buses are high.

According to a report by the American Public Power Association, a diesel transit bus can cost about $500,00 to purchase, an electric bus, about $750,000. A diesel school bus cost about $110,000, an electric school bus, about $230,000.

But electricity costs much less than diesel fuel, and electric vehicles require less maintenance — no oil changes, no mufflers and no exhaust systems.

Ridgefield First Selectman Rudy Marconi said the town used grants in 2014 to buy an electric Nissan Leaf, which town officials use in their daily work

The overall savings in fuel, upkeep and maintenance has made the car a bargain, he said.

“Absolutely,” Marconi said. “No doubt.”

Because buses run a fixed route and return to a fixed location, they’re ideal candidates for an electric fleet — recharged in the bus yard at night, ready to run by morning.

Schreiner said, however, there are wrinkles that have to be worked out. The HARTransit system covers an area from Norwalk to New Milford, so it might need more than one recharging center.

Along with its 28 transit buses, it has 32 smaller buses it uses for services like its SweetHART routes for seniors and persons with disabilities.

“The whole system has to be configured to do all this stuff,” Schreiner said.

But the environmental payoff — cleaning the state’s air — would be great.

The DEEP’s Dykes said Connecticut consistently fails to meet the federal Environmental Protection Agency’s clean air standards.

Some of that is due to geography. Prevailing winds blow pollution from the Midwest coal power plants, and from the Washington D.C.-Philadelphia-New York corridor into our skies.

But 69 percent of the air pollution of the state comes from auto emissions, Dykes said. Of that, 40 percent comes from buses.

Diesel fumes contribute to the state’s carbon dioxide emissions, fueling climate change.

But they also emit high levels of nitrogen oxides and particulate matter that fuel the state’s smog and bad air days in summer.

Dykes said this contributes to the state’s high asthma rates, especially in inner city neighborhoods and along transit routes where buses run.

She said about 11 percent of the state’s children and 10.5 percent of adults have asthma, with higher rates in some big cities. Overall, it costs about $100 million a year to treat asthma in the state.

So a fleet of electric buses will save money across the boards. And people can be healthier.

“It means clean air for kids and adults,” Dykes said.