Pepe has agreed a one-year contract extension with Real Madrid, reports Spanish radio show El Larguero.
The Portugal centre-back, 33, has been a key figure at the Bernabeu since making a €30m (£27.2m) move from Porto back in 2007.
His current deal expires next summer but he has agreed a new one-year extension which will tie him to the European champions until June 2018.
Real Madrid will make the new deal official in the coming weeks.
Pepe had already made it clear that his intention was to stay back in September, saying: “I’m going to wait until the last millisecond for Real Madrid. If they don’t renew me I can think about retiring from football.”
The 33-year old, who has become one of the most influential players in the Real Madrid dressing room over the years, can now look forward to seeing out his third, and almost certianly final, contract with the club since arriving from Porto in 2007.