By Anthony Harrup

MEXICO CITY -- Mexico's biggest retailer, Wal-Mart de Mexico SAB, said its net profit fell 81% in the second quarter as it paid a large tax settlement, while sales increased from a year earlier amid widespread shutdowns over the coronavirus pandemic.

Walmex, as the unit of Bentonville, Ark.-based Walmart Inc. is known, said Thursday that sales in the April-June period rose 9.5% from a year before to 169 billion Mexican pesos ($7.5 billion), while earnings before interest, taxes, depreciation and amortization -- a measure of cash flow -- fell 3.3% to 15.7 billion pesos.

Net profit fell to 1.7 billion pesos from 8.8 billion pesos in the second quarter of 2019 as the result of an 8.1 billion-peso tax settlement paid in May, partly related to Walmex's 2014 sale of its restaurant business.

Same-store sales in Mexico grew 6.3% from a year earlier, while in Central America, more rigid restrictions against the coronavirus contributed to a 6.1% drop in same-store sales, led by Honduras.

"Social distancing measures are driving higher in-home consumption, and customers' purchases continue to lean toward essentials," Walmex chief executive Guilherme Loureiro said Thursday in a webcast presentation.

He said that at the end of the first quarter, as the pandemic was beginning in Mexico, the company sold more cleaning supplies and staples, but as the stay-at-home period extended Walmex started to see increasing demand for puzzles, board games and kitchen supplies.

The shutdowns over the coronavirus had an uneven effect on retailers in Mexico. While malls, department stores and specialty retailers not considered essential by authorities were closed, supermarkets, drugstores and convenience stores remained open.

Grupo Sanborns SAB saw revenue fall 66% as its department stores and other shops were closed through mid-June, and its Sanborns stores and restaurants offered only limited services. Sanborns' online sales increased fivefold from a year before, partially mitigating the shutdowns, the company said.

"After the reopening of the stores in June, a recovery in sales is observed," Sanborns added.

Overall retail sales in Mexico fell 24% in April and May from the year-earlier months, according to statistics institute Inegi.

Write to Anthony Harrup at anthony.harrup@wsj.com