Fleetwood Town have named Preston North End head of youth Graham Alexander as their new manager.
The 41-year-old retired from playing at the end of last season after 1,024 professional appearances.
He will replace former boss Micky Mellon, who was sacked following the Highbury club's FA Cup exit to Aldershot on Saturday.
The Cod Army are seventh in League Two following their promotion from Blue Square Bet Premier last season.
Fleetwood honours since 2003
- 2012: Blue Square Bet Premier champions (promoted to the Football League)
- 2010: Blue Square North runners-up and play-off winners (promoted)
- 2008: Northern Premier League Premier Division champions
- 2007: Northern Premier League Challenge Cup winners
- 2006: Northern Premier League First Division runners-up (promoted)
- 2005: North West Counties Football League Premier Division champions
The job will be Alexander's first permanent managerial role in professional football.
However, the Scotsman does have some previous experience, taking joint-caretaker charge of Preston alongside David Unsworth last season following the sacking of Phil Brown. The Deepdale club lost just one of his five games in charge.
During a playing career spanning 22 years, Alexander played 421 games in two spells for the Lilywhites.
The former Scotland international, who also featured for Scunthorpe, Luton and Burnley, retired from playing in April.
His first game in charge will be at home to fellow promotion-chasers Southend on Saturday.
Mellon's sacking came as a surprise after leading them to two promotions in charge.
joined the club in 2008
from Burnley where he was working as a youth-team coach and in 2009-10 he took Fleetwood out of Blue Square North
via the play-offs.
In their first season in the Blue Square Bet Premier, they lost in the play-offs to AFC Wimbledon.
A year later the Scot guided the club to the Football League as
and they also reached the FA Cup third round for the first time.
The Cod Army have spent the majority of this season in the top seven of League Two, but Pilley decided to take action after losing the past three games.