If ever there was a game in which the result was all that mattered, it was this one.
Dundee, and their under-pressure manager, got their win. Just.
Time will tell if this proves to be a season-changer or a false dawn but what was in no doubt was that Neil McCann’s players gave everything for him.
The Andy Boyle opener was scored near the end of the first half and, after the visitors passed up a couple of chances to get a second, their goal came under siege for spells.
A combination of poor finishing, woodwork and good fortune, topped off with a 94th minute Karl Madianga sucker-punch, ensured the Dark Blues ended a seven-game losing run and got their first Premiership points on the board.
At last they now have a platform to build on.
Dundee did a good job of keeping the home team at arm’s length in the first half, restricting Accies to just one chance – a volley on the turn smashed over by Dougie Imrie on the half-hour mark.
Then seven minutes before the break they took the lead for the first time in the league this season when Boyle headed home a Calvin Miller free-kick at the back post.
Dundee weren’t complaining but from a Hamilton perspective it was a shockingly simple set-piece goal to concede at such a crucial stage of a well-balanced game.
The Dark Blues nearly doubled their advantage on 54 minutes when Ryan Inniss saw a low shot from 10 yards brilliantly saved by Gary Woods.
There was another golden opportunity on 70 minutes when Adil Nabi shot over the bar. The better option would have been to put through Benjamin Kallman.
Dundee have earned a reputation for coughing up cheap goals and Elliott Parish was almost culpable for another one when a weak punch fell at the feet of Steven Boyd, who failed to cash in.
Accies were pushing hard for an equaliser and Fredrik Brustad was a fraction away from getting his toe to a low cross from the left that flew across the six yard box.
They got even closer on 77 minutes when substitute James Keating hit the bar with a free-kick that Parish was well beaten by.
Then in injury time the bar again came to Parish’s rescue when a Mason Bloomfield header came back off it.
With a rare counter-attack, Dundee sealed the three points when Madianga fired home from inside the box.