The news was announced at a Wrexham Supporters Trust meeting on Thursday, with club director Spencer Harris describing the decision as "brilliant news".
The Dragons have been in fine form recently, with five wins in the their last eight games taking them into the top half of the National League table and within seven points of the play-off places.
Keates is seeing the rewards of a busy January transfer window, as he brought in the likes of Carlisle United midfielder Russell Penn and experienced striker Izale McLeod.
During his playing career Keates made 153 appearances for Wrexham AFC, captaining them to their FA Trophy Final win over Grimsby Town in 2013.
Wrexham AFC Director Harris said “Extending Dean’s contract for three and a half years is brilliant news for Wrexham AFC. In a short period of time, Dean has stamped his authority on the team and along with his coaching staff have brought a modern-day approach to coaching and player development. We believe that approach will be very successful for the club.”
“Dean gets the football club and its fans and is working extremely hard on taking us in the right direction. His approach is very much to get everybody together as one team: fans, Board, staff and players to give us the very best chance of success”.
Article: Mark Carruthers (@marknldaily)
Image: Reuters Media