Gillingham have named Steve Evans as their new manager, with the former Leeds and Peterborough boss starting his new role on 1 June.
Evans, 56, has been out of work since he was sacked by Posh in January, with whom he won 21 of 52 games in charge.
League One Gills dismissed Steve Lovell in April and eventually finished 13th under caretaker boss Mark Patterson.
"Steve has had good success as a manager in the past," chairman Paul Scally said.
"I fully expect him to bring us success both on and off the field, working within our budgets."
Evans, who guided Rotherham to successive promotions from League Two to the Championship in 2013 and 2014, 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.
However, the Scot has the backing of his new employer.
"Steve is no fool, and neither am I to be fair," Scally continued. "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."
In his end-of-season report, Scally also said he is considering his role with the club after what he described as "disgusting and disgraceful abuse" from "so-called fans" at times during the past season.