McDonald's supremo Don Thompson is stepping down as chief executive as the world's biggest hamburger chain fights to hold on to customers and transform its image.

The company said Mr Thompson, who has been CEO for two and a half years, would be replaced by former McDonald's UK boss Steve Easterbrook, a company veteran who rejoined the company as its chief brand officer in 2013.

McDonald's, which has more than 36,000 restaurants around the world, is struggling amid intensifying competition and changing attitudes about food. Customer traffic at established locations in the US fell 4.1% last year, following a 1.6% decline in 2013. It is also trying to recover after a supplier scandal in China that damaged its reputation.

Mr Thompson, 51, the first African-American to head the company since it was founded in 1955, will retire on March 1 after nearly 25 years with the company, making way for Watford-born Mr Easterbrook, 48.

"It's tough to say goodbye to the McFamily, but there is a time and season for everything," Mr Thompson said in a statement.

Meanwhile an unspecified number of employees at the company's headquarters in Oak Brook, Illinois, and elsewhere have been given redundancy notices.

In after-hours trading, shares of McDonald's jumped 3% to 91.79 dollars. The stock has declined about 6% in the past year while broader markets are up in the double digits.

With Mr Easterbrook's promotion, McDonald's is continuing its tradition of promoting from within, noted Darren Tristano, a restaurant industry analyst with Technomic. That could be a drawback for a company that is struggling to keep up with a rapidly changing industry.

"Sometimes, you need fresh perspective," Mr Tristano said, adding that the competition had been "evolving faster than McDonald's products have been".

Despite the pressures McDonald's is facing, the timing of Mr Thompson's departure was a surprise considering the numerous revitalisation efforts the company had recently announced, said Richard Adams, a consultant for McDonald's franchisees.

He said the CEO change left open the question of whether McDonald's would shift course on those initiatives. "Is everything going to change, or are Don's plans going forward?" he said.