Gareth Ainsworth: Gillingham appoint Shrewsbury Town boss as new manager
The former Accrington Stanley boss has managed just two wins in his 14 games at the helm.
Former Wycombe Wanderers boss Ainsworth, 51, has only been in charge at Shrewsbury since November, taking over a side that was bottom of League One.
Having won five and lost 12 of his 22 games in charge, he is set to move down a division, with Shrewsbury still bottom and 14 points from safety with nine matches to play.
Ainsworth will become Gills' fifth different manager in 18 months after Neil Harris, Stephen Clemence, Mark Bonner and Coleman.
BBC Radio Shropshire's Shrewsbury Town commentator Nick Southall:
It's fair to say this news has well and truly caught the club by surprise.
Gareth Ainsworth had talked about wanting to build something special at Shrewsbury over a long period of time, as he did at Wycombe.
The constant message was he loved Shrewsbury and the short-term pain was worth it for the long-term gain.
BBC Radio Shropshire understands Shrewsbury fought tooth and nail to keep Ainsworth after being approached by Gillingham, to the extent he was offered a two -year extension no matter what league they are in.
They also tried to keep Ainsworth until the end of the season, but the release clause was triggered and now the decision has been made with the news expected to be confirmed imminently.