A late try by Oyonnax's Jonathan Bousquet gave his side a losing bonus point that kept them in the French Top 14 and sent Perpignan down for the first time in 103 years.
With Bayonne winning comfortably 23-13 against champions Castres it came down to a straight fight between Perpignan and Oyonnax for survival.
The Catalans led several times and came close to ending Clermont's four-year winning run at home, which now extends to 75 matches, before succumbing 25-22.
That bonus point defeat would still have been enough to keep the 2009 champions in the Top 14.
But Oyonnax came back from 19-3 down at Brive, who had nothing left to play for, to score tries from Guillaume Bousses in the 66th minute and then Bousquet eight minutes from time to lose only 19-17 and secure themselves a bonus point.
Seven-time champions Perpignan had never before been relegated from the top flight in the professional era and had not gone down since 1911.
"We promised ourselves we would leave this match with our heads held high and without regrets," captain Bertrand Guiry told Canal Plus.
"We matched them blow for blow, it could even have gone our way.
"It's very difficult to play in this context where it depends on such tiny details.
"The players have been exemplary all season, we never let up and have always worked hard.
"Maybe we should have taking responsibility sooner given that we were able to produce good matches."
But the Catalans produced the worst record in the second half of the season -- apart from hapless Biarritz who had long already been relegated -- and finally left themselves needing to get something from their last two matches against Toulon and Clermont.
In truth they came close to stunning Vern Cotter's team and ending Clermont's amazing winning home run but finally came up just short, punished as well by three second half yellow cards.
Elsewhere Toulon held onto top spot in the regular season with a close 17-15 win over Stade Francais in Nice.
Montpellier joined them in getting a bye directly into the play-off semi-finals after crushing Racing-Metro 44-10.
That defeat cost the Parisians a home tie in the play-off quarter-finals as they dropped below Toulouse.
Racing had come into the match as the team with the most points in the second half of the season but imploded as Montpellier ran in five tries to one from Ireland fly-half Jonathan Sexton.
Toulouse ran in six tries, including a hat-trick from New Zealander wing Hosea Gear, to blitz Grenoble 38-8 and take the winning bonus point that propelled them above Racing on a better head-to-head record.
Castres held onto their play-off spot despite the defeat at Bayonne as Stade Francais's losing bonus point against Toulon left them a point short of the play-offs.
The champions face a trip to Clermont and the daunting Marcel Michelin stadium in the quarter-finals in a repeat of last year's semi-final, in which Castres shocked the odds-on favourites a week after Clermont had lost to Toulon in the European Cup final.
But it was down the bottom where the main drama was taking place and Perpignan started badly when Wesley Fofana went over for the hosts.
The Catalans took the lead 13-10 after Wales fly-half James Hook converted a try from South African wing Wandile Mjekevu.
But Clermont scrum-half Morgan Para won the kicking battle with Hook, landing a further five penalties to Hook's three.
In other games Biarritz's miserable season ended in fitting style with another thrashing, 54-20 at Bordeaux-Begles.