– So many rats regularly lurk on a sidewalk in Brooklyn that it is the humans who avoid the rats, not the other way around. Not even cars are safe: Rats have chewed clean through engine wires.

A Manhattan avenue lined with trendy restaurants has become a destination for foodies — and rats who help themselves to their leftovers. Tenants at a public housing complex in the South Bronx worry about tripping over rats that routinely run over their feet.

New York has always been forced to coexist with the vermin, but the infestation has expanded exponentially in recent years, spreading to just about every corner of the city.

“I’m a former Marine so I’m not going to be squeamish, but this is bad,” said Pablo Herrera, a 58-year-old mechanic who has counted up to 30 rats while walking on his block in Prospect Heights, just around the corner from the stately Brooklyn Museum.

Rat sightings reported to the city’s 311 hotline have soared nearly 38%, to 17,353 last year from 12,617 in 2014, said an analysis of data by OpenTheBooks.com, a nonprofit watchdog, and the New York Times. In the same period, the number of times that city health inspections found active signs of rats nearly doubled.

Mayor Bill de Blasio, like mayors before him, has declared war on rats, but so far the city is still losing.

“There is no doubt that rats have a major impact on New Yorkers’ quality of life, and this administration takes seriously our responsibility to control and mitigate their population,” said Laura Anglin, deputy mayor of operations. “No New Yorker likes having rats in their community and we are committed to continuing the work of controlling rats in all of our neighborhoods.”

One key reason rats seem to be everywhere? Gentrification. The city’s construction boom is digging up burrows, forcing more rats out into the open, scientists say. Simon Williams, a researcher at Columbia University’s Mailman School of Public Health, likened the impact of the construction on rats to “stepping on an ants’ nest.”

Milder winters make it easier for rats to survive and reproduce. And New York’s growing population and thriving tourism has brought more trash for rats to feed on.

The problem extends beyond New York: Philadelphia, Chicago and Los Angeles are also facing outbreaks. “Everywhere I go, rat populations are up,” said Robert Corrigan, a research scientist who estimates that their numbers may have increased by as much as 15 to 25% in some cities.