(Reuters) - J.C. Penney's JCP.N Chief Executive Officer Marvin Ellison is leaving the struggling retailer to join home improvement chain Lowe's Cos Inc LOW.N, the companies said on Tuesday, sending shares in the U.S. department store chain down as much as 8 percent to an all-time low.

Slideshow ( 2 images )

Ellison came to Penney in 2014 with a strong reputation honed through 12 years at Lowe's biggest competitor, Home Depot Inc HD.N. Shares of Lowe's gained 3 percent on the news before retreating.

The 52-year-old will take over on July 2.

At J.C. Penney, Ellison was tasked with stemming a two-year sales decline as the company struggles to stay relevant in a brutal U.S. retail landscape, where customers are increasingly turning to online shopping.

The chain has been among the hardest hit by a collapse in mall traffic, leading to thousands of U.S. stores being closed in the past five years. J.C. Penney’s stock price dwindled to $2.29 per share on Tuesday from $87 a decade ago.

“Marvin Ellison’s departure from J.C. Penney is another signal to investors that the company is distressed,” said Jason Benowitz, a senior portfolio manager with fund managers The Roosevelt Investment Group in New York.

“The captain is not going down with the ship but has chosen instead to save himself.”

Results last week showed J.C. Penney missed same-store sales estimates for the quarter ended May 5 and it cut its full-year profit forecast because of changes to its accounting standards. Shares fell 12 percent on that day.

Analysts said Ellison had managed to bring about some changes at the retailer, like focusing it on large home appliances, but said it was still trailing far behind others like Macy’s, which is starting to show signs of turning its businesses around.

Macy’s is focusing on upgrading existing businesses, such as its beauty and apparel departments through creative merchandising or adding experiential elements, rather than being distracted by new categories, said Carol Spickerman, a retail analyst.

This embracing of a more agile test-and-learn model by Macy’s is turning out to be more successful than J.C. Penney, which has relied on chain-wide big bets like major appliances.

Analysts also said that without a clear merchandising strategy and no differentiation compared to rivals, J.C. Penney was more vulnerable than Macy’s in apparel.

J.C. Penney said Ellison would stay on until June 1, while they look for a new CEO. He will step down as chairman of the board immediately.

After that a group of four executives including Chief Financial Officer Jeff Davis will take over day-to-day running until a new CEO is appointed.

Ellison joins Lowe’s at a time it has been losing market share to bigger rival Home Depot. He replaces Robert Niblock, who in March said he was retiring after 13 years on the job.

“While closing the productivity gap with Home Depot will be no small feat, we see the announcement as a favorable development,” Gordon Haskett analyst Chuck Grom wrote in a note.