Cristiano Ronaldo has signed a new five-year deal with Real Madrid but insists it will not be his last as he targets another decade at the top.

The 31-year-old is looking to play on into his 40s and will be 36 when his new contract expires.

The three-times Ballon d’Or winner, who was called a “living legend” by the Real president, Florentino Pérez, during the press conference announcing the deal, says that will not be the end of his playing days.

“I want to stay here and finish here,” Ronaldo said. “It is not my last contract, I want to keep going until I’m 41 but now the most important thing is this special moment that makes me happy and my family, too.

“I’m at the best club in the world. Everyone knows what my thoughts are. I want to continue being the best. I want to wear this shirt with pride. I’m sure I’m going to contribute the same over the next five years as I have in my time here, scoring goals and winning titles.

“I’m very happy. It is a dream come true to extend my contract here at the club. All I want to do is continue rewriting history here at this club.

“No one knows what the future holds but I would like to end my career at this club. This is my penultimate contract. I want to be here for many years to come.”

The former Manchester United winger has become Real’s leading goalscorer since his move from Old Trafford in 2009. He also captained Portugal to Euro 2016 victory in the summer, the country’s first major silverware, and admitted this year has been one he could only have dreamed of.

“I’m on the crest of a wave,” he said. “Look back at my last season; win the Champions League with Real Madrid, win the European Championship with Portugal and sign a five-year deal at Madrid. What more can I say? It is a dream year, unbelievable, something I thought was impossible.

“I am a dreamer but another thing is achieving your goals. It is true the stats are unbelievable, I never expected to score so many goals in such a short period of time … and I want to keep rewriting history.

“Five years is a long time and I will try to give my best. There will be highs and lows during a footballer’s career. I still have things to learn. I want to win more and more for the best club and to continue learning.”