The 25-year-old Argentina international had been linked with a move away from the Santiago Bernabeu for much for the close-season, with Arsenal said to be among the clubs interested in acquiring his services.
But after pledging his commitment to the La Liga giants, the former Benfica man confirmed that Ancelotti's belief in him helped to persuade him to remain.
"Yes I will be staying here," he confirmed to Fox Sports Radio.
"I have the confidence of the coach, I am very happy and my family also, which is the most important thing."
The midfielder set about repaying Ancelotti's faith by setting up Cristiano Ronaldo to score in Real's 3-1 victory over Athletic Bilbao last Sunday.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.