The Brazil international appeared to be on his way out of the Spanish capital during the summer transfer window, with rumours circulating that former club AC Milan had lined up a move for him.

However, Kaka eventually stayed put, and the 30-year-old impressed on Wednesday when handed a rare start by coach Jose Mourinho in the 4-1 Champions League win over Ajax.

"I think I am heading in the right direction. Wednesday, I showed that the work I have been doing is paying off and I am regaining the confidence of the coach," he said.

"And that's what I always hoped would happen. I want to gain his trust, play more, and bit by bit I think things will turn out the way they should."

Looking ahead to this weekend's La Liga encounter against Barcelona, the attacking midfielder stressed it was a vital game for his side's title ambitions.

"And now we can look forward to giving our all in the Clasico because it's a crucial match for us," he said.