Accies produced the sort of dramatic comeback typical of league leaders as Cowdenbeath squandered a two-goal lead.
Three goals in a five-minute spell helped Hamilton turn a potentially damaging defeat into a win that sees them go into Saturday’s match against second-top Dundee with the opportunity to open up a nine-point gap at the top of the SPFL Championship.
Meanwhile, for the Blue Brazil, things are looking bleak as they sit on 11 points from 13 games, with back-to-back home games having been lost.
Cowden manager Colin Cameron said after the match that the fragility of his team’s confidence levels was there for all to see.
The hosts had taken an 18th-minute lead through Nat Wedderburn and then doubled the advantage in 32 minutes with a neat finish to a four-man move by Lewis Milne.
Accies struggled in the first third of the second period and Cowdenbeath had chances to put the game to bed but failed to take them.
A chance for the visitors in 64 minutes, when Martin Canning had to go off with a head knock to be replaced by Jesus Garcia Tena, turned the game.
Tena pulled one back from 50 yards a minute after coming on, Darian MacKinnon squared the match three minutes later before Ziggy Gordon’s spectacular finish put them ahead with 20 minutes left.
Tony Andrieu’s time-added-on goal was simply the icing on the cake.
Cameron was very unhappy that too few of his players were prepared to scrap it out for the entire 90 minutes.
“We were excellent in the first period and scored two cracking goals and there could have been at least one other,” he said.
“At the start of the second half, there were chances for us to extend the lead but a goalkeeping error by Thomas Flynn allowed a shot from the half-way line to go in after a poor kick-out and suddenly we fell apart.
“We needed people to step up to the plate but instead the players disappeared and, within a five-minute spell, we went from being in a comfortable position to losing the game.
“It really is not good enough.”