Women's Champions League: Chelsea qualify for quarter-finals
Guro Reiten's penalty gave Chelsea the lead at Stamford Bridge just past the hour. Substitute Athenea equalised for Madrid but goalkeeper Mylene Chavas turned Erin Cuthbert's shot into her own net as the English champions clinched top spot in Group D.
Swedish club Hacken are second in the section, a point above Paris FC after the two sides drew 0-0 in Gothenburg. Already-eliminated Madrid suffered their fourth defeat in five matches.
PSG, who began the competition with back-to-back losses in Group C, took over first place after a 3-1 win over Ajax that denied their opponents the chance to qualify with a match to spare.
Marie-Antoinette Katoto struck twice for the hosts at the Parc des Princes before Romee Leuchter pulled one back for the Dutch side.
Captain Grace Geyoro restored PSG's two-goal lead prior to half-time, with the French outfit needing a draw away to Bayern Munich next week to seal a spot in the last eight.
Bayern snatched a point in a 2-2 draw at Roma courtesy of Lea Schuller's 96th-minute header.
Roma led through Valentina Giacinti's first-half effort before Schuller equalised three minutes from time.
The Italians looked to have won it when Manuela Giugliano scored in the third minute of added time only for Schuller to deny them at the death.