New Mexico is expected to receive nearly $17 million from a federal settlement with Volkswagen in a lawsuit claiming the company’s diesel engine emissions violated the Clean Air Act — money that could be used to build electric vehicle charging stations and natural gas refueling sites along highways.

But only if the state is ready to use the money when it comes available.

The U.S. Department of Justice found the car company guilty of rigging diesel engines to cheat on emissions tests and sued Volkswagen. A federal district judge has said he “intends” to sign the $14.7 billion settlement soon.

About $10 billion in the settlement will help owners of Volkswagen diesel vehicles purchase new, lower-emission cars. Another $2.7 billion is set aside for an environmental mitigation fund for reducing nitrous oxide emissions, while $2 billion will pay for a zero-emission-vehicle fund.

Besides New Mexico ($16.9 million), other Western states set to receive funding are Arizona ($53 million), Colorado ($61 million), Nevada ($22 million), Utah ($32 million) and Wyoming ($75 million).

States can choose to put some of the money into switching out old diesel-powered delivery trucks and school buses, as well as freight trains, with newer, more efficient ones that emit less nitrous oxides. States also could use the money to help local governments buy electric-powered public buses.

“In sum, the ‘environmental mitigation fund’ is set aside for states to invest in a myriad of clean air measures that are intended to reduce damage to air quality caused by vehicles and machinery,” said James Hallinan, a spokesman for the New Mexico Attorney General’s Office. “New Mexico’s specific actions have not yet been determined.”

States could also opt to use some of the money to install compressed natural gas refueling stations or solar-powered electric vehicle recharging stations along highways and interstates for passenger and light-duty vehicles. Electric vehicle advocates say this could boost the use of what they consider zero-greenhouse-gas-emission cars.

“The VW settlement offers states the opportunity to build out infrastructure for the most cost-effective and cleanest technology on the road today at no cost,” said Will Toor, director of transportation programs with the advocacy group Southwest Energy Efficiency Project.

The federal government asked states in July to submit nominations for “alternative fuel corridors” along highways and interstates. These corridors will be places where drivers eventually could charge up their electric vehicles or fuel their natural gas- or hydrogen-powered vehicles at stations, the same way they now fill up with gas. The deadline to submit the requests was Aug. 22. Colorado, Arizona and Utah nominated some of the interstates that also go through New Mexico.

The corridors require no money from states, but if approved they would make states eligible for federal funding to install infrastructure such as natural gas stations and electric charging stations.

Once the Volkswagen settlement is approved, a trust fund will be set up in 2017 for states to access the money. States will have a 90-day period after the trust fund is established to submit a plan for using the funds.

Colorado has wasted no time in preparing for the $61 million it expects to receive from the Volkswagen settlement. The state’s Department of Health and Environment has scheduled a public meeting Nov. 7 to explain the settlement and solicit ideas on how the money should be used.

Toor and others at the Southwest Energy Efficiency Project want states to direct as much of the environmental fund as the settlement will allow into building out alternative fueling stations on interstates, preferably electric recharging stations. Since electric cars only get about 40 miles to a charge currently, a network of such sites is needed across states.

“That would really address the biggest concern people have with adopting electric vehicles, which is will there be charging stations where they need them,” said Mike Salisbury, senior associate with the Southwest Energy Efficiency Project’s transportation programs.

Electric buses have benefits aside from reducing nitrous oxides, according to Salisbury. He calculated that the 12-year life span of an electric bus translates into a savings of $130,000 in fuel costs and $70,000 in maintenance costs.

In July, 50 vehicle manufacturers, electric vehicle charging companies and electric utilities — including PNM Resources, which operates the Public Service Company of New Mexico — signed on to a set of federal guiding principles to build out electric charging infrastructure.

“New Mexico didn’t apply for this because we don’t yet meet federal eligibility requirements for these funds,” Emilee Cantrell, a public information officer with the New Mexico Department of Transportation, said of New Mexico’s lack of nominations for the corridors. “Before we can request to designate an alternative fuel corridor, we need the infrastructure and consumer demand to support one.”

In the 2016 legislative session, New Mexico lawmakers passed a memorial to study expanding natural gas vehicle use in the state. The memorial recommends promoting the U.S.-Mexico border port of entry at Santa Teresa as part of an alternative vehicle corridor plan.