The 29-year-old has been a key performer for Los Blancos during his time in Spain, helping the team to two Champions League trophies in 2022 and 2024.
Mendy is the first-choice left-back at the Bernabeu, starting four La Liga matches so far in the 2024-25 schedule as Real Madrid aim to retain the Spanish crown.
That being said, the former Lyon defender was forced to settle for a spot on the bench on Saturday afternoon, when Los Blancos recorded a 4-1 win over Espanyol.
Falling behind in the Bernabeu battle due to a Thibaut Courtois own goal, strikes from Dani Carvajal, Rodrygo, Vinicius Jr and Kylian Mbappe secured a comeback success.
Ancelotti confirms new contract for Mendy
Speaking after his side's second-half thumping of newly-promoted Espanyol, Ancelotti confirmed a new contract for one of his first-team defenders.
When asked for an update on Mendy's new deal at the club, the former Everton boss responded: "It is all signed, yes. We are very happy with Mendy."
As a result, Mendy is set to extend his stay at Real Madrid into a seventh campaign after moving from Lyon during the summer window of 2019.
According to transfer guru Fabrizio Romano, the Frenchman has signed a three-year deal with Los Blancos, committing his future to the club until June 2027.
It is understood that an agreement had been in place for the fresh terms since August, with both sides of the arrangement happy to put the lingering situation to bed.
Competition for places
Playing 75 minutes of Real Madrid's opening Champions League clash of the season versus Stuttgart, Mendy is clearly the first-choice option at left-back for Ancelotti.
Regardless of that, the 29-year-old was dropped for Los Blancos' La Liga contest on the weekend, when they needed a comeback to get the better of Espanyol.
Academy graduate Francisco Garcia started the match for Real Madrid, with Ancelotti clearly trusting the 25-year-old on the left side of the backline.
With the Spaniard performing well, Mendy will know that he has ample competition for a starting spot despite signing a new three-year deal.