By Khadeeja Safdar

Nike Inc.'s sales rebounded in the summer quarter after slumping earlier during the coronavirus pandemic, as rising digital sales offset declining revenue at traditional stores.

On Tuesday, the sportswear company said revenue was $10.6 billion in the quarter ended Aug. 31, down 1% from the prior year. Digital sales increased 82%.

"These are times when the strong can get stronger," Chief Executive John Donahoe said on a conference call with analysts. During the pandemic, he said the company gained market share across the Nike and Jordan brands and returned to growth in international markets, including China and Europe.

The latest results showed a turnaround from the spring quarter, when the sneaker giant's revenue plunged 38% amid store closures. Nike's shares rose 9% in late trading as the results were better than Wall Street had expected. The stock was trading near all-time highs.

Nike said nearly all its owned stores were open during the quarter, but the company continued to experience declines in traffic due to the pandemic and safety-related measures.

The coronavirus prompted Nike and other retailers to close their stores, governments to limit travel and many shoppers to stay home. Though most U.S. states are gradually easing lockdown measures, there have been flare-ups of new cases that have interrupted reopening plans in parts of the country.

The virus also prompted most professional and youth sports to be temporarily suspended. However, many leagues have now resumed playing. The National Basketball Association is wrapping up its playoffs from a bubble in Florida, and the National Football League kicked off its season earlier this month. Nike has sponsorships with both leagues.

Nike said it spent less on marketing because of postponed or canceled sporting events. That translated into higher profits, even though gross margins declined.

For the fiscal first quarter, net income was $1.52 billion, or 95 cents per share. That was nearly twice as much as Wall Street analysts had projected, according to FactSet. In the year ago quarter, Nike had a profit of $1.37 billion.

The company also continued to shift more attention to its own stores, website and apps. Direct sales made up $3.7 billion of revenue in the quarter, up 12% from last year.

The company has been using its website and shopping apps to release some limited edition sneakers.

While many gyms have been closed, athletic apparel makers have reported strong demand for their clothing and more casual attire as more people work and exercise at home. Rival Adidas AG said in August it was seeing improving sales trends and yoga pants maker Lululemon Athletica Inc. posted a 157% jump in its online business in the quarter ended Aug. 2.

On Tuesday's call, Mr. Donahoe said Nike doubled down on sustainability to reach younger shoppers and on women's apparel with a new maternity collection and yoga clothes. He also cited the "cultural resonance" of the Nike brand at the moment, adding that its athletes were supporting causes like Black Lives Matter.

Over the summer, Mr. Donahoe told employees that there would be layoffs this year, but didn't specify how many. A Nike spokesman at the time said the reorganization wasn't due to the pandemic, but intended to improve the company's agility. As of May 31, Nike employed 75,400 people.

Write to Khadeeja Safdar at khadeeja.safdar@wsj.com