Walmart said on Thursday that profit fell about 8 percent last quarter, and it lowered its sales forecast for this year, citing a strong dollar and the costs of a plan to close more than 200 stores worldwide.

Walmart, based in Bentonville, Ark., has been fighting for a firmer footing in a retail market increasingly dominated by the online behemoth Amazon.

Walmart’s efforts to entice more web and mobile customers resulted in 8 percent sales growth for the quarter, the company said. But e-commerce sales growth has been steadily declining for the last year, from 17 percent growth in the first quarter, despite heavy investments in the business.

In contrast, Amazon said sales rose 26 percent in its fourth quarter, compared with 15 percent sales growth in the first quarter.