Real Madrid have announced Sergio Ramos has agreed a new deal with the club - ending a summer of speculation that the defender was set to leave the Bernabeu.

Ramos, 29, has been linked with a move to Manchester United since the start of the transfer window but Madrid have confirmed he has agreed a contract that will keep him at the club until 2020.

The World Cup winner will appear alongside club president Florentino Perez in a signing ceremony later on Monday - with a new deal for central defensive partner Pepe also expected to be announced at some point.

Ramos has also been made the club captain following Iker Casillas' departure, and announcing his new deal alongside Real president Florentino Perez, the three-time Primera Division winner said he was never looking to leave the Bernabeu.

"I know this renewal has taken a while but my heart and head have always been with Real Madrid so I couldn't be happier," he said in a press conference.

"I've never spoken about my renewal. With a contract that had two years to go, whatever the press want to say I respect but the reality is a bit different.

"My idea was to always be here and I always wanted to retire here if the president would allow it, and I'm thankful I have a new challenge to be the captain of this team. The priority is always Real Madrid, keeping our fans happy and winning titles.

"I'm being honest I never said I wanted to leave, I was quiet. I never said anything out of respect for my team-mates and the president, I never rang the office to ask for more money. I'm just very happy that I have renewed and I want to stay here for the rest of my career.

"At the end of the day I have been here almost my whole life. My first year was in Sevilla and the rest of my life has been here, that is sufficient motive to want to stay. There is nothing like this institution. My own happiness is the priority, in the end that was fundamental."

United were reportedly ready to offer Ramos a pay rise in a bid to lure him to Old Trafford after he was identified as one of Louis van Gaal's main transfer targets.

But, having been a Real Madrid player for a decade, the former Sevilla youngster said money is not his main concern.

"Honestly, if it was an economic decision I wouldn't have stayed," he said.

"It wasn't a question of money. There were personal and professional things that I needed to organise and that is all sorted.

"It is reality that I wasn't happy in certain ways. I never said I wanted to leave but I spoke to the people I needed to speak to and couldn't continue how I was. Those personal things were nothing to do with money.

"The economic situation, the president and I solved that in five minutes. There were other things to talk about - past, present and future. Now everything is cleared up I'm excited to get everyone together and try and win. Everything is cleared up now, I'm very happy to be here."

Madrid start Primera Division life under new coach Rafael Benitez with a trip to Sporting Gijon on Sunday, and Ramos is counting on the continued support of the club's fans now that his protracted contract talks have come to a satisfactory conclusion.

"I think they will always receive me with the same affection they always have," he said, when asked what sort of reaction he expected from the supporters.

"I have never felt anything untoward in this stadium and as long as the fans love me that is one of the important things that helped me to stay.

"The fans will always ask a lot of you but the footballers of Real Madrid know we have pressure and responsibility, and I hope I will have the same affection I have always had."