GELSENKIRCHEN, Germany - Cristiano Ronaldo ended a brief goalscoring slump to help holder Real Madrid beat Schalke 2-0 in the last 16 of the Champions League on Wednesday.

Ronaldo headed home in the 26th minute of the first leg match, after going three matches without a goal in the Spanish league. He also set up Marcelo for the second goal in the 79th.

"Clearly he lives to score and it was an important goal — and a good reaction at an important stage of the season," Madrid coach Carlo Ancelotti said.

Real Madrid routed Schalke 6-1 last season at the same stadium with a ruthless attacking performance, advancing 9-2 on aggregate. Madrid went on to win a record 10th title and is seeking to become the first repeat Champions League winner.

This time, Schalke defended much better but did not threaten much either.

The closest it came to scoring was in the 74th, when Felix Platte, making his Champions League debut, fired a volley from the edge of the area against the crossbar.

"It's a disappointing result. Neither team had many chances but they scored," Schalke coach Roberto Di Matteo said. "If Platte had scored, the match might have gone our way."

The second leg in Spain is on March 10.

In the night's other match, Danilo scored a late penalty to earn Porto a 1-1 draw at Basel.

Madrid stretched its winning streak in the Champions League to 10, scoring 27 goals and conceding three. The Spanish club had won only three of 27 trips to Germany before Wednesday.

Schalke defended mostly with five men, often with eight and sometimes had 10 players behind the ball as Madrid enjoyed two-thirds of the possession.

Ronaldo had a simple header for his 73rd goal in the Champions league after Dani Carvajal floated a cross behind the back of Schalke's defence.

In the second half, he shook off two defenders to lay the ball on for Marcelo, who curled a fine shot into the top corner from the edge of the penalty area to complete the victory.

"The quality up front made the difference," Di Matteo said.

One minute before Ronaldo's goal, Klaas-Jan Huntelaar tested Iker Casillas, who dived to his left to turn the ball away.

Schalke's 19-year-old goalkeeper Timon Wellenreuther, who was making his debut in the Champions League, then made a great point-blank save from Karim Benzema. The ball slithered through his legs but he dropped behind to scoop it up.

Huntelaar limped out of the match in the 33rd minute, to be replaced by Platte, a 19-year-old debutant with 11 minutes of Bundesliga experience.

"He played without fear," Di Matteo said.

Kevin-Prince Boateng was then booked for downing Ronaldo and will miss the second leg.

Ronaldo took the free kick and fired a dipping shot but Wellenreuther produced a spectacular save.

In the 40th, Ronaldo beat Wellenreuther to the ball but could not control it before it went out of bounds.

"It was a great occasion for me, but I wish I had kept a blank sheet," Wellenreuther said.

Madrid dominated the second half and Schalke rarely advanced beyond the halfway line until late in the match.

Ancelotti's team also benefited from the return from injury of defender Pepe.

"He showed his experience and his presence was very important for us," Ancelotti said. "We played a good match, it wasn't played at great pace but it was a match of patience and we controlled it."