Chipotle Mexican Grill Inc. (NYSE:CMG) appears to be recovering after five quarters of declines. The company reported earnings of $1.60 a share last quarter, higher than the $1.29 predicted by analysts. Revenue climbed to $1.07 billion, topping an average estimate of $1.05 billion.

The burrito chain’s sales are finally starting to bounce back after its food-safety crisis that began in 2015. An E. coli outbreak and other food-poisoning incidents resulted in many regular customers avoiding the chain. To recapture market share, the chain has rolled out a new ad campaign, free-food offers, and improved digital services. Chipotle also introduced a temporary loyalty program and added chorizo as a topping to get people back in its stores.

The moves seem to have worked. Same-store sales increased almost 18 percent in the first quarter, topping the 15.5 percent average estimate of analysts. The chain said that sales rose 17.8 percent at established locations for the three months ended March 31, following a 29.7 percent decline in the year-ago quarter. The company believes that same-store sales will gain in the high single digits for the year.

Chipotle opened 57 new restaurants during the quarter, and plans to add up to 210 this year. The company ended the quarter with 2,291 stores. The company also announced that it will begin testing two dessert items next month.

Chipotle is still contending with higher labor costs and a tight labor market. The chain raised menu prices by about 5 percent earlier this month at about 20 percent of its locations to deal with the higher expenses, but that hasn’t appeared to affect traffic.

After the announcement, the company’s shares gained the most in more than three months. Chipotle’s stock rose as much as 4.3 percent after the announcement, rising to $491.84 in the biggest intraday gain since January. Through Tuesday’s close, the shares have gained 25 percent this year.

Chipotle has also revealed that its payment system suffered a data breach. The burrito chain said that it had detected “unauthorized activity” on a network that supports payment processing for purchases made at Chipotle restaurants. At the moment, there is little information about the scope of the unauthorized activity.

Chipotle said a fraud investigation is underway and has warned customers to closely monitor their payment card statements and notify their bank if they see any unauthorized transactions. The company has not yet released the timeframe of the breach or the restaurant locations that were affected. John Hartung, Chipotle’s CFO, said that the company has “implemented additional security enhancements,” but declined to comment further.

Get Analysts' Upgrades and Downgrades Daily - Enter your email address below to receive a concise daily summary of analysts' upgrades, downgrades and new coverage with MarketBeat.com's FREE daily email newsletter.