pepe-xl-091212getty

Pepe lies in pain on the Mestalla Stadium pitch on Saturday in Valencia. On Sunday, it was revealed the defender will undergo knee surgery and be out at least six months. ((Javier Soriano/AFP/Getty Images) )

Real Madrid says Pepe will have surgery on his injured right knee on Thursday.

The Spanish club revealed that their star defender will undergo the operation at Orden Da Trinidade hospital in Porto, Portugal.

The Portugal defender's season is likely over and his participation in next year's World Cup is in doubt after team doctors said he will miss up to six months with the ligament injury.

Pepe came down awkwardly on his right leg during Saturday's 3-2 win at Valencia.