Jim Bentley has resigned as manager of League Two's bottom club Morecambe to take charge of National League side AFC Fylde on a two-and-a-half-year deal.
The 43-year-old was the longest-serving manager in England's top four divisions before his resignation on Monday.
Bentley had been Shrimps boss since May 2011, having previously spent nine years with the club as a player.
The former centre-back has dropped a division to join Fylde, who sacked Dave Challinor on 12 October.
"It's been an emotional couple of days, but it's for the right reasons - I'm coming to a new venture now which I'm really excited about," said Bentley, who will be joined at Mill Farm by his long-time assistant Ken McKenna and goalkeeper coach Lee Jones.
"I'm very proud of the job I've done there, but I want a CV that shows promotions as much as the survival.
"It's totally geared to go up here, it's a club going in the right direction, and hopefully I can carry on the good work that David Challinor did here."
Striker Kevin Ellison, 40, and goalkeeper Barry Roche, 37, will take temporary charge of Morecambe until a successor is found.
Bentley 'an amazing servant' to Morecambe
A Morecambe statement said Bentley's resignation had been accepted "with great reluctance".
It continued: "Jim has stated his desire to take on a new challenge and it is only right that we honour his wish after the service he has given this club.
"He has been an amazing servant for us as player, captain and manager and has deservedly gained a fantastic reputation throughout the game for what he has achieved with the club.
"We cannot thank him enough for his contribution to the club over the years and it goes without saying he will always be welcome at the Globe Arena.
"Jim's name is synonymous with Morecambe and he has always had the very best interests of the club at heart, playing and managing with great pride, honour and integrity and he departs with the best wishes of everyone connected with the Shrimps."
|Longest-serving managers in England's top four divisions|
|Gareth Ainsworth||Wycombe||24 Sep 2012*|
|Eddie Howe||Bournemouth||12 Oct 2012|
|Sean Dyche||Burnley||30 Oct 2012|
|Mauricio Pochettino||Tottenham||27 May 2014|
|John Coleman||Accrington||18 Sep 2014|
|Jurgen Klopp||Liverpool||8 Oct 2015|
|*initially as caretaker - full-time appointment on 8 Nov 2012|
Bentley's departure means Wycombe's Gareth Ainsworth is now the longest-serving boss in England's top four divisions.
Ainsworth was put in caretaker charge of the Chairboys in September 2012 before being given the job full-time at the start of November that year.
Bournemouth's Eddie Howe and Burnley's Sean Dyche were recruited by their respective clubs in October 2012, before Ainsworth was appointed on a permanent basis.
Morecambe are bottom of League Two after losing at Stevenage on Saturday.
It proved to be Bentley's final game in charge of the Shrimps, ending his near 18-year association with the Lancashire club.
After replacing Sammy McIlroy as manager more than eight years ago, Bentley fought against financial problems - with the club's players and staff paid late on numerous occasions - to keep Morecambe in the Football League.
In January 2017, with the club under a transfer embargo and under serious financial pressure, supporters paid Bentley's £1,000 fine after he had been sent to the stands during a match the previous month.
Under his stewardship Morecambe never finished higher than 11th in the fourth tier, finishing 21st, 18th, 22nd and 18th in the past four seasons with one of the division's smallest budgets.
Fylde beat Leyton Orient in the FA Trophy final in May, eight days after losing the National League promotion final to Salford, but had been in the relegation zone this term until beating Boreham Wood on Saturday under caretaker managers John Hills and Brett Ormerod.
Earlier this month Barrow rejected an approach from Fylde to talk to Ian Evatt about their managerial position, which Challinor filled for eight years before his departure.
Andy Bayes, BBC Radio Lancashire
Bentley's achievements as Morecambe manager will not have medals or trophies to back up the job that he has done so successfully.
Morecambe's budget is consistently one of the smallest in the EFL, as are home attendances, but year on year he has defied the odds by steering the Shrimps to survival.
During his eight full seasons in charge, he has gone through two takeovers and times where the players and staff went weeks on end without being paid. His squad of players are devastated by his departure.
His biggest disappointment will be leaving Morecambe bottom of the table and whoever takes over the role has a unenviable task of securing a 14th successive season in League Two.