Gap Posts First Comparable-Sales Increase Since March 2015

Gap posted a surprise 2% comparable-sales increase in June buoyed by strength at its Old Navy brand, following more than a year of monthly declines.

"We are pleased to see better performance across the portfolio this month, partly driven by an improvement in June traffic trends," the retailer said.

In after-hours trading, Gap shares rose 4.5% to $22.60. Through Thursday's close, the stock is down 22% in the past three months.

The 2% increase is in sharp relief to the 3% drop projected by analysts Thomson Reuters had polled.

The company's namesake brand had a 1% decline in comparable sales, with Banana Republic down 4% and a 5% increase at Old Navy.

Total sales rose to $1.57 billion from $1.54 billion.

Gap's last comparable-sales increase was in March 2015. Gap and other mall-focused chains have been hurt by the rise of online shopping and the popularity of fast-fashion retailers such as H&M operator Hennes & Mauritz AB and Zara owner Inditex SA.

Gap said on May 9 said it was suffering from a "tepid macro environment for apparel retail."

Write to Josh Beckerman at josh.beckerman@wsj.com