Maitland-Niles penalty sees Lyon beat Brest in 16th minute of injury time
It was a topsy-turvy affair in which the lead switched hands three times before Lyon eventually emerged victors well beyond the original allotted period of added time to stun second-placed Brest at the Groupama Stadium.
Corentin Tolisso opened the scoring before Steve Mounie and Romain Del Castillo struck in the space of seven minutes to give Brest a 3-1 lead but Alexandre Lacazette, Nicolas Tagliafico and Maitland-Niles hit back in the final 20 minutes to grab all three points for Lyon.
Pierre Sage's side sit seventh and, after an appalling start to the Ligue 1 season, now have a realistic chance of qualifying for European football next term.
Brest failed to clear a set-piece and Tolisso took advantage, controlling the bouncing ball before turning and lashing a left-footed finish past goalkeeper Marco Bizot in the 18th minute.
Mounie struck back for Brest, cancelling out Lyon's lead on the hour mark with a firm header back across goal following Del Castillo's whipped free-kick from deep. Del Castillo then netted twice in three minutes to send Brest into a 3-1 lead.
The first came in the 64th minute courtesy of a curling free-kick from inside the 'D' that Anthony Lopes got a hand to but could not prevent from going in.
Kamory Doumbia then set up Del Castillo's second with an intelligent pull-back that the attacker swept into the goal from just inside the box. The two-goal lead lasted only two minutes as Lacazette volleyed home on 70 minutes after more poor Brest defending from a set-piece.
Defender Tagliafico completed the come-back 11 minutes from time with a driven finish into the far corner.
Both sides finished with 10 men apiece after Tagliafico and Pierre Lees-Melou saw red for an altercation in the 86th minute.
Lyon claimed for a penalty deep into injury time after the Brest 'keeper cleaned out Lacazette, injuring the Lyon captain. After a lengthy VAR review, the referee pointed to the spot and Maitland-Niles made no mistake from 12 yards to claim all three points for Lyon in the 16th minute of injury time.
The defeat leaves Brest still in second place but 10 points off leaders Paris Saint-Germain and one point ahead of third-placed Monaco, both of whom have a game in hand.
Daylight for Nantes
An injury-time winner gave Nantes a precious victory away to Le Havre as Antoine Kombouare's side went three points clear of the 15th-placed hosts and five clear of Lorient in the relegation play-off spot.
Abdoul Kader Bamba fired home three minutes into injury time at the end of the second half to give Nantes a crucial 1-0 victory.
"Le Havre could have won... we were able to push our limits and snatch three points out of nowhere," said Nantes coach Kombouare.
The result leaves Le Havre two points ahead of Lorient with the 16th-placed side having played one less match.
Clermont picked up a point at home to Montpellier following a 1-1 draw but remained rooted to the bottom of the Ligue 1 table and six points from safety.
Muhammed Cham put the home team ahead going into the break with a penalty five minutes into first-half added time, before Tanguy Coulibaly levelled matters for Montpellier in the 56th minute.