Gap Inc posted a 25 percent rise in quarterly profit as sales rebounded at its Old Navy chain and the company recorded its highest margins in a decade.

The apparel retailer, which is now running television commercials, said it plans to boost marketing costs for the holiday season in a bid to gain market share.

The company has enjoyed a revival in sales at its lower-cost Old Navy chain due to better merchandising. But sales at Gap stores, as well as its more upscale brand Banana Republic, have remained lackluster.

Wall Street Strategies' analyst Brian Sozzi cited momentum at Old Navy and improved margins as positives.

Considering the company is up against ever difficult merchandise margin comparisons, achieving such gains is no small feat in a still competitive specialty apparel market, Sozzi wrote in a research note.

Gap has kept a tight rein on costs to protect profit margins, but said its operating expenses would be up between $100 million to $120 million in the fourth quarter versus the prior year, with marketing expenses up about $45 million.

We will save money where its appropriate but also make targeted investments where we think we can move the needle -- particularly when it comes to growing the business and moving top-line sales forward, Chief Executive Glenn Murphy told analysts during a conference call.

Shares in the company fell 1.4 percent in extended trading, which Sozzi attributed to the additional investments.

The street may be a bit unsure whether this investment will pay off on the sales line, said Sozzi.

The retailer also said its board of directors had authorized a new $500 million share repurchase program.

Third-quarter net profit was $307 million, or 44 cents per share, up from $246 million, or 35 cents per share, a year earlier. Analysts on average forecast earnings of 44 cents per share, according to Thomson Reuters I/B/E/S.

As previously reported, total revenue rose 1 percent in the quarter to $3.59 billion.

HIGHEST MARGIN IN A DECADE

Gap, which operates more than 3,000 stores in the United States and abroad, has been streamlining its operations to combat a longtime sales slide at its main Gap brand, where the company has been working to improve its merchandise.

Gap said its gross profit margin in the quarter rose 380 basis points to 42.5 percent, while its operating margin rose to 13.9 percent from 11.1 percent in the year-ago period. Murphy said the third-quarter operating margin was the company's highest in a decade.

Gap, which has started to advertise its Gap brand on television again after a long absence, said its operating expenses rose by $40 million in the quarter, largely due to fall marketing campaigns.

Sozzi said the share buyback could potentially alleviate some of the pressure from the additional investments.

Inventory per square foot was down 9 percent in the quarter and Gap said inventory would be about flat at the end of its fourth quarter, in what Sozzi said was a sign the company was committing to its same-store sales.

Shares closed at $21.86, down 2 percent on the New York Stock Exchange, and were trading slightly down at $21.55 in extended trade.

(Reporting by Alexandria Sage; Editing Bernard Orr)