Dundee United went into their last home SPL game of the season looking for the three points that would go a long way to securing fifth spot in Ian McCall's first full season in charge.
The game was preceded by a presentation by chairman Eddie Thompson to United midfielder Craig Easton. Easton who will leave the club in the summer has been at Tannadice for nine years and was making his last home appearance, albeit as a substitute.
It was the home side who started the game in the ascendancy and the first opening came in the second minute when Jason Scotland ran on to a through pass from Alan Archibald only for Derek Stillie to come off his line and block the shot.
In the fifth minute United were denied what looked a stonewall penalty when Charlie Miller went down in the area, but referee Mark McCurry ignored the Tangerines claims.
Miller was not to be denied though and he opened the scoring in the eighth minute when he slotted the ball past Stillie from seven yards after good play on the left by Scotland.
United increased their lead in the 23rd minute and it was Miller who was involved again. He tried his luck with a long-range shot that Stillie seemed to struggle to get back to and tip over.
From Barry Robson's resultant corner David McCracken headed the ball on at the front post and it landed perfectly for Chris Innes to nod home his first goal in United colours from close range.
United clearly had the game by the scruff of the neck and they went 3-0 up on the half-hour mark in what was a disaster for Pars keeper Stillie.
It looked like all he had to deal with was a standard through ball, but he somehow managed to blast the ball against the back of one his own men allowing Scotland to run through and slot home into an empty net.
Quite predictably Jimmy Calderwood's side responded four minutes later when Derek Young's corner was headed home by the unmarked Lee Bullen.
Six minutes before half-time there was a huge roar from the crowd as Easton was introduced for an injured Derek McInnes.
Dunfermline are known for never accepting defeat and they pulled another goal back within seconds of the re-start when another excellent cross from Young was headed home by Scotland international striker Stevie Crawford.
This signalled the start of sustained Pars pressure and a succession of corners put the United defence under pressure.
United took more of a hold of the game in the last quarter with Robson and Miller causing the visitors plenty of problems.
There was almost a fairytale ending for Easton when he went close with a half-volley from the edge of the box with just ten minutes remaining.
United held on, however, for a vital three points that now makes them favourites for fifth spot.