Former Crawley Town manager Steve Ecvans has been appointed manager of League One club Gillingham.
Evans was sacked as Peterborough United boss in January after a turbulent 11-month reign.
Evans has long been the favourite to take over at Priestfield following the dismissal of Steve Lovell in April.
Evans left Posh sixth in League One when he was dismissed because of an apparent personality clash with chairman Darragh MacAnthony.
Gillingham chairman Paul Scally said: "Steve has had good success as a manager in the past,
"I fully expect him to bring us success both on and off the field, working within our budgets."
Evans guided both Crawley Town and Rotherham to successive promotions, has had a colourful career in management.
While he has enjoyed success - earning promotions with Boston, Crawley and the Millers - there have been off-the-field issues from stadium bans to charges for improper conduct.
Scally added. "He is aware of comments against him from some supporters, about his reputation, about what people are saying about his past, but I would never entertain the prospect of bringing in a manager whom I thought was wrong for the club.
"Although no manager comes with guarantees I can categorically say that Steve Evans is by far the best candidate for the role I have seen, and I intend to appoint him as club manager, he will commence his role on 1 June."
Scally sacked Steve Lovell two games before the end of the season, eventually finishing 13th under caretaker boss Mark Patterson.Evans is no stranger to the Gills, having been a regular at games during the latter part of the season.
His long-term assistant Paul Raynor who was recently spotted watching his former club Crawley Town has also watched the Gills at first-hand and is expected to join as his assistant.