McDonald’s Corp. is getting customers back into its restaurants after years of declining traffic, helped by drink deals and more upscale burgers.

The company saw an increase in U.S. diners last quarter – a key milestone that has proved elusive to Chief Executive Officer Steve Easterbrook – and posted same-store sales that handily beat analysts’ estimates. The shares rose most in three months, hitting a record high.

The results mark a victory for the 49-year-old CEO, who has worked to overhaul McDonald’s for the past two years. Even after he managed to increase sales at the world’s largest restaurant chain, helped by higher prices, it’s taken longer to get more people in the door.

“You can increase sales by raising prices, but that’s not sustainable,” said Michael Halen, an analyst at Bloomberg Intelligence.

The shares increased 25 percent this year through Monday’s close.

As many of its fast-food competitors struggle, McDonald’s has boosted sales with cheaper drinks, all-day breakfast and higher-quality chicken. The chain is also improving kitchen equipment to make its food taste better. Same-store sales rose for the eighth-straight quarter, and its domestic gain of 3.9 percent beat analysts’ estimate of 3.2 percent.

Easterbrook has contended with a record run of grocery deflation that has made restaurants a tougher sell.