After McDonald’s announced all-day breakfasts three years ago, it gradually forgot about mornings.

Overall sales have weakened in the U.S., market share has shrunk, and McDonald’s has identified lost breakfast customers as the main culprit. Now the world’s biggest restaurant company plans to fight back with discounts, breakfast catering and a ploy lifted straight from a 1997 “Seinfeld” episode — selling only the tops of muffins.

“We took our eye off the ball on breakfast,” Chief Financial Officer Kevin Ozan said at a May investor conference. “With everything else going on, we just lost a little focus on that breakfast day part.”

For McDonald’s, breakfast has long been a stronghold, said Linda VanGosen, vice president of menu innovation for the U.S. It accounts for 25 percent of domestic sales, and mornings are the most profitable part of the day.

But rivals are advertising cheap eats and some of them are moving to sell breakfast all day, too, taking the shine off McDonald’s 2015 announcement. After reaching an all-time high in January, McDonald’s shares are down more than 10 percent.

“It had been a while, I think, before we had really focused in on talking to customers about that morning day part,” VanGosen said.

So in Baltimore, McDonald’s has been offering coffee cake and 160-calorie blueberry muffin tops. In Florida, it has introduced breakfast catering at 195 restaurants.

“There’s a new renewed, intense focus on breakfast,” Ozan said.

McDonald’s U.S. fast-food market share has eroded. Last year’s 14.7 percent was down from 17.4 percent five years ago, according to researcher Euromonitor. Meanwhile, Taco Bell, which began selling breakfast in 2014, has been gaining share.

“It’s sort of unusual to hear McDonald’s talk about not executing,” said Sara Senatore, a Sanford C. Bernstein & Co. analyst. “This is a big company that’s always been known as an operating company.”

She said she is optimistic, though, that McDonald’s can revive the morning.

“With that focus, I don’t see any reason to believe they can’t compete and win back some of that lost share,” she said.