Kylian Mbappe scored all four goals as Real Madrid hung on to beat Olympiacos 4-3 in the Champions League on Wednesday and end a three-match winless run in all competitions.

Chiquinho fired home from 20 yards to finish off a neat move as Olympiacos took an early lead in Greece, but Mbappe stole the show and took over as the competition's leading scorer this season.

"It was very important to get back to winning ways, we know that three matches without that is a lot for us," Mbappe told Movistar.

"(The team) looks good to me, of course there are things to improve. At a club like Real Madrid (it's normal) that people talk."

The France captain drilled through the legs of Olympiacos goalkeeper Kostas Tzolakis to bring Madrid level on 22 minutes after racing onto a sublime ball in behind the defence from Vinicius Junior.

Mbappe struck again two minutes later when he planted a header low into the corner from an Arda Guler cross.

The forward completed the second fastest Champions League hat-trick ever as he ran clear and steered beyond Tzolakis again, his three goals coming in the space of six minutes and 42 seconds.

Only Liverpool's Mohamed Salah, against Rangers in 2022, has scored a quicker hat-trick in the competition.

Substitute Mehdi Taremi, who replaced the injured Chiquinho in the first half, hauled Olympiacos back into the match with an emphatic header past stand-in Madrid goalkeeper Andriy Lunin on 52 minutes.

The Ukraine international was filling in for Thibaut Courtois, who missed the trip due to illness. Madrid were also without Dean Huijsen, his absence adding to those of Dani Carvajal, Eder Militao and Antonio Rudiger in an injury-ravaged defence.

Madrid had never won away to Greek opponents on seven previous visits but Mbappe ensured the Spanish giants put an end to that sequence, turning in his fourth of the night after excellent work by Vinicius down the left.

That took Mbappe to nine goals in five Champions League matches this term, sending him three clear of Victor Osimhen at the top of the scoring charts.

"I'm very happy, it's always a pleasure to score goals. My team-mates are giving me quality passes. I'm very lucky to play in this team, with these team-mates," said Mbappe.

Ayoub El Kaabi halved the deficit with nine minutes left but Madrid clung on to earn their fourth win in five Champions League matches, bouncing back from a loss at Liverpool in their last European outing.

"The important thing today was to break up, a little bit, the dynamic we were coming from, and to get back that (winning) feeling," said Madrid coach Xabi Alonso.

The record 15-time European champions moved up to fifth in the standings with games still to come against Manchester City, Monaco and Benfica.

"We need everyone, and it's clear that today Kylian stands out with the goals, but today it was very important to change the dynamic... and that's why the players were celebrating," said Alonso.