After what Paul Hartley felt was his team's best performance since he took over, Dundee now know the title race is in their hands with three games to go.
There was an inevitability about the outcome from the moment 16-year-old Craig Wighton put them in front after six minutes with a composed finish.
Seb Usai kept out a header from Gavin Rae as Dundee sought a second but it was first-half injury-time before Martin Boyle doubled their advantage after good work from Wighton.
Jim McAlister headed in the third in the second half and Boyle contributed his second to round off the scoring.
Hamilton, who led the table at the start of the day, found the going tougher at Livingston as the sides drew 1-1.
It could have been worse as Marc McNulty hit the crossbar with a penalty in the first half and Stephen Hendry was sent off in the opening minutes of the second half.
Kyle Jacobs, with his first goal of the season, put Livingston ahead with a close-range shot from a corner after 64 minutes.
But Hamilton showed resilience to come back and take something from the game. Jason Scotland drilled an equaliser past Darren Jamieson with just four minutes left to ensure his team did not leave empty-handed.
Falkirk cannot be counted out yet after they beat Queen of the South 2-1 at Palmerston to remain within four points of the summit.
In a game delayed by 15 minutes due to traffic congestion, Stephen McKenna was denied by the woodwork late in the first half for Queen of the South and Jonathan Flynn should have scored at the other end but could not keep his header down.
Falkirk took the lead after 58 minutes with a wonderful strike from Blair Alston after he linked well with Conor McGrandles. Before Queens had time to recover, Mark Beck added a second with a neat touch.
The home side pulled a goal back from Gavin Reilly before Flynn was shown a straight red card. Derek Lyle saw a late effort hit the post for Queens.
Alloa finally killed off any remote hopes Morton had of holding onto their Championship status with a 2-0 win at Recreation Park.
There was a brief early flurry from Morton which saw Dougie Imrie go close with a header but Alloa did not take long to exert a grip.
Kevin Cawley, who had missed an earlier chance, put Alloa ahead after 15 minutes when he headed home Ryan McCord's cross from close range.
Alloa increased their lead early in the second half when McCord left Derek Gaston with no chance with a powerful header from Michael Doyle's cross.
Ross Caldwell and McCord both had late chances to embellish the scoreline as Morton accepted their fate.
Dumbarton beat Ramsdens Cup winners Raith Rovers 3-1 away from home with goals from Mark Gilhaney, Mitch Megginson and Colin Nish.
Gordon Smith pulled one back for Raith but comeback hopes disappeared when Dougie Hill was red-carded for a trip on Nish 15 minutes from time.