While Wal-Mart revives its plans to get into New York City, a giant German retailer has slipped in relatively unnoticed.

In February, with virtually no opposition — a Queens politician even showed up at the grand opening in Rego Park, Queens — a discount retailer called Aldi opened its first store in the city, and plans to open a second one, in the Bronx, later this year.

After decades spent fleeing cities for the strip malls and boulevards of the suburbs, grocers and discount retailers are doing an about-face. Target plans to open its first smaller, city-size store in Seattle next year, and Wal-Mart announced recently that it would build “hundreds” of smaller, mostly urban stores in the coming years.

Meanwhile, Aldi has quietly been setting up its shops in cities around the country.

“They’re not only doing the small format more rapidly, but they’re getting into the urban areas more rapidly than either Wal-Mart Express or the city Targets,” said Craig Johnson, president of the consulting firm Customer Growth Partners. “Even though the company’s headquartered in Germany, they’ve opened up a New York store quicker than Wal-Mart has.”