The infuriating La Guardia Airport traffic that has forced some travelers to walk down the highway could have been avoided — if the city wasn’t nearly a decade late in performing $100 million in road projects, a state audit revealed Wednesday.

In 2009, the city agreed to put up the cash for ­traffic-mitigation and infrastructure improvements in or around La Guardia and JFK airports and surrounding neighborhoods as part of its lease agreement with the Port Authority.

In exchange, the PA, which operates the airports, agreed to transfer a desirable waterfront property in Long Island City to the city that is being used for affordable and luxury housing — Queens West/Hunters Point.

“The city agreed to assume funding of the $100 million in capital projects. However, through June 2016, the city has committed only $25 million of the $100 million,” a release by state Comptroller Tom DiNapoli said.

The city had spent only $6.3 million of the funds earmarked for capital projects seven years after the agreement was reached, the audit said.

Airport and transit advocates were outraged.

“The buck has to stop somewhere. The city needs to step up and work together with the Port Authority to end the traffic nightmare around La Guardia and make passengers’ lives better, not worse,” said Global Gateway Alliance chairman Joe Sitt.

The city Economic Development Corp., then overseen by the Bloomberg administration, issued a press release in the summer of 2009 announcing the $100 million allocation for Queens.

The projects include building a new bus station at Columbus Plaza near La Guardia and constructing new sewer and water infrastructure at Willets Point next to Citi Field.

It also called for a study to come up with traffic improvements at the intersection of Astoria Boulevard, the BQE and Boody Street near La Guardia.

In addition, portions of Main and Union streets in Flushing would be converted from two-way streets to one-way streets to ease traffic.

Mitigation projects around JFK include the Atlantic Avenue Extension to improve access to downtown Jamaica and the Air Train/LIRR.

Queens Borough President Melinda Katz and Gov. Cuomo declined to comment on the audit.

A spokesperson for De Blasio said: “The City has spent or committed the vast majority of the $100 million in capital construction funds — $97 million to date – in Queens. The City is closely tracking this funding obligation, and is fully prepared to meet its commitments.”