Walmart posted strong sales and profits in the latest quarter helped by a massive $2.9 billion in tariff refunds.

The nation’s retailer earned $6.4 billion in net income in the three months ending July 31. That’s down from last year, but better than analysts expected.

The company told CNN it is eligible for approximately $2.9 billion in tariff refunds, or the money it will get back from the government for tariffs paid on imports in 2025 and early 2026. To date, it has received most of the money.

Walmart, which raised its guidance for the year, said it would invest the tariff refunds in “customer experience and price investments,” or price cuts.

It’s not the only big retailer logging big tariff refunds during the latest quarter. Earlier this week, big box rival Target reported its refund came to $994 million. TJX, which operates chains including TJ Maxx, Marshalls and HomeGoods, got $331 million. Home improvement stores Home Depot and Lowe’s reported $730 million and $80 million refunds, respectively.