By Saabira Chaudhuri

Nestlé SA said sales slowed in recent months from the blistering pace set earlier this year, when shoppers stripped shelves bare during coronavirus lockdowns.

Still, the world's biggest packaged food company said Thursday that second-quarter organic sales grew 1.3% from the previous year, bolstered by pet food -- which has remained a hot seller in the pandemic era.

Nestlé, along with rivals such as Kraft Heinz Co. and Campbell Soup Co., benefited earlier this year when consumers stockpiled familiar comfort foods from big brands as the pandemic took hold. That drove a 4.3% rise in Nestlé's first-quarter sales, but the company said some consumers had held back adding to already full pantries in the past few months. Lower sales of products sold outside of the home, like water, also weighed on the most recent quarter, it added.

Overall, the maker of Nescafé coffee and DiGiorno pizza said first-half sales rose 2.8% on an organic basis -- which strips out M&A and currency impacts -- beating analyst estimates for growth of 2.3%. Revenue dropped 9.5% to 41.15 billion Swiss francs ($44.94 billion) in the first six months of the year, while net profit rose 18.3% to 5.9 billion francs boosted by one-off items such as the sale of its U.S. ice cream business.

Pet food was the biggest contributor to growth among Nestlé's categories, with pricier lines Purina Pro Plan -- marketed as tailoring nutrients to meet specific needs of pets at different stages of life -- doing particularly well.

During the half, sales in North America logged mid-single-digit organic growth, driven by pet food, coffee, baking products and frozen foods as consumers continued to eat at home.

China posted a double-digit decline in first-half sales, as a recovery in recent months failed to offset sharp falls in sales early in the pandemic.

In Europe, the Middle East and North Africa, Nestlé said sales grew 2.4% on an organic basis in the six-month period, but that gains in the first quarter were partly offset by declines in more recent months. Those were caused by weakness in out-of-home sales for water and the company's business selling to cafes and restaurants.

Nestlé -- the world's largest bottled water maker -- in June said it was exploring a sale of the majority of its North America waters business, including brands such as Poland Spring and Pure Life. The company instead plans to focus on upscale and international brands including San Pellegrino and Perrier, as well as functional water. Together those lines make up about 20% of its North America water sales.

The company said Thursday that San Pellegrino had continued to grow in the U.S. in the first half even as the overall water business in the country logged a sales drop.

Globally, water sales dropped 10.4% on an organic basis in the first half.

Nestle remains a rarity amid the pandemic in offering firm financial guidance for the year, despite the volatility caused by Covid-19. The company said it expects full-year organic sales growth between 2% and 3%.

Write to Saabira Chaudhuri at saabira.chaudhuri@wsj.com