In front of the lowest crowd of the season, Motherwell hung on to an early Derek Adams penalty to clinch the three points they needed to confirm a top-six finish.
The decisive penalty came as early as the tenth minute when Jason Dair was hauled down by Andy Tod. Adams confidently stroked the ball to the keeper's left as he dived right.
Within a minute Dunfermline were almost on level terms when Gary Dempsey's shot was saved point-blank by Gordon Marshall after Paul Quinn and Martyn Corrigan had failed to clear.
The Pars pushed forward and were slicing Motherwell open without ever looking like scoring, until Dempsey saw his effort saved by Marshall on 23 minutes.
Five minutes later at the other end Dair saw his lob cleared off the line by Andrius Skerla. The defender was on hand again just on half-time as he was called on to head another Dair effort off the line.
The second half started with a succession of misplaced passes and hopeful high balls, but it was Motherwell who were first to create a clear opening when a square ball from Alex Burns found Dair 18 yards out, but the midfielder blasted his shot over.
After 63 minutes Dunfermline threw on Craig Brewster and Steve Crawford to try to claw something back from the game and in fact Brewster almost scored with his first touch but his shot hit a divot and bounced wide of the post.
With 15 minutes to go Motherwell almost found the goal that would have calmed the nerves in the stadium, but Burns' header just looped over the bar.
In the closing stages both teams pushed to look for the vital breakthrough, but it was the referee who took centre stage with a series of bizarre decisions.
In the end none of this mattered to the team in claret and amber as they closed the game out to clinch a top-six place for the first time since the SPL split was introduced.