the nine-time winners were made to battle by the quarter-final debutants but late on karim benzema scored twice and kaká once to put them in charge.
real madrid cf are on the verge of the semi-finals for the second season running as three goals in the final 16 minutes all but ended apoel fc's remarkable uefa champions league run.
the nine-time winners were made to work hard for victory in nicosia despite dominating possession and territory; the introduction of kaká just past the hour provided the spark they needed. the brazilian set up karim benzema for the 74th-minute opener and scored the second himself eight minutes later, benzema crowning what had looked set to be a frustrating evening with madrid's third in the final seconds.
the match started in its expected pattern with apoel showcasing the disciplined defending – particularly in their own penalty area – that had brought them this far in the competition as they sought to make life difficult for their illustrious visitors. their plan might have been disrupted when centre-back marcelo oliveira went off injured in the 13th minute but kaká came on his place and apoel's rearguard remained unruffled.
madrid, with nuri şahin taking the place of the suspended xabi alonso in central midfield and fábio coentrão starting at left-back, pressed forward at every opportunity. it was the portuguese who initiated many of the visitors' attacking moves in a first half in which madrid enjoyed 70% of the possession.
coentrão's cross created the first chance of the game as it was cleared only as far as mesut özil just inside the penalty area. the german playmaker had time to steady himself before sending in a right-foot volley that dionisios chiotis beat away diving to his right.
the apoel goalkeeper was called upon again to keep out two cristiano ronaldo efforts in quick succession, but he was powerless to intervene when ronaldo found şahin in space on the left. the turkish international's cross left benzema with what appeared a simple finish, but the striker hit his shot into the ground and over.
while madrid continued to push their hosts back, it was not until the 64th-minute introduction of kaká that they finally unlocked the apoel defence. ronaldo and sergio ramos both had shots blocked while benzema steered an effort just wide but the frenchman would not be denied and finally broke the deadlock, diving to head in kaká's pinpoint left-wing cross.
the visitors sensed their opportunity, chiotis saving from ronaldo and benzema as madrid looked to increase their lead. the goalkeeper, the hero against olympique lyonnais in the round of 16, was beaten again when substitute marcelo broke down the left and pulled a low cross back for kaká to slot in.
with the apoel players tiring, madrid broke with pace and özil's low cross was turned in by benzema to put madrid in total command of the tie. despite the margin of defeat the home supporters – so crucial to apoel's success this season – gave their favourites a standing ovation at the final whistle, but madrid look certain to progress.