Last updated on .From the section Scottish Premiership

Dundee were relegated from the Scottish Premiership after Tony Andreu's late penalty for Hamilton condemned the hosts to a 10th straight defeat.

It leaves Jim McIntyre's side eight points adrift of second-bottom St Mirren with two matches left.

Andreu's 83rd-minute spot-kick moved Hamilton four points above the relegation play-off spot.

Dundee needed at least a point to have any chance of survival but barely threatened in a nervy performance.

Their fate was sealed when Ryan McGowan brought down Mickel Miller in the box and Andreu coolly sent Seny Dieng the wrong way.

Hamilton can now guarantee survival by avoiding defeat away to St Mirren next weekend.

Desperately poor from Dundee

Dundee have looked doomed for weeks and it was no surprise that they once again failed to perform under pressure.

Goalkeeper Dieng has been one of their better players in a miserable season, but a rush of blood to the head almost gifted Hamilton an early opener.

Dieng rushed out to try to reach a floated free-kick into the box, got nowhere near it and watched in relief and Marios Ogkmpoe's head flick dropped narrowly wide.

The hosts looked ill at ease with their unfamiliar set-up of a back three and going forward were let down by misplaced passes and poor deliveries. It was desperately poor stuff from a side supposed to be fighting for their lives.

Scott Wright at least showed an urgency lacking in some of his team-mates. A promising burst forward from the on-loan Aberdeen winger was cut short by a heavy challenge. And from the free-kick, Wright bent a shot over the wall but into the hands of Ryan Fulton.

Hamilton had more of a cutting edge and came close to breaking the deadlock shortly before the interval, with Dieng racing off his line to smother a shot from Darian MacKinnon.

Dundee were down as it stood at half-time and McIntyre knew drastic action was needed, taking off defender Genseric Kusunga for striker Craig Curran. Given Curran has yet to score since signing in January, it was a change made in hope rather than expectation.

Curran had a looped cross tipped over by Fulton and John O'Sullivan headed a decent delivery wide, but the onslaught never arrived from the hosts.

Their need to push forward left them vulnerable and Hamilton picked them off to create a succession of chances.

Aaron McGowan had a header cleared off the line by James Horsfield, Scott McMann curled a superb 25-yard attempt inches wide and George Oakley's drive was destined for the top corner until Dieng made a fine save.

The breakthrough finally arrived when McGowan clumsily brought down substitute Miller and Andreu put McIntyre's men out of their misery to end their five-year stint in the top flight.

'Big rebuild ahead' - analysis

BBC Scotland's Jane Lewis at Dens Park

Losing to Hamilton might have sealed Dundee's relegation arithmetically, but it was a 10th straight defeat that really nailed their fate.

And manager McIntyre was honest enough to admit it. Not good enough over the last few months, was his assessment. His recruitment in January, he conceded, was not up to the mark.

His position now is perhaps finely poised. Yes, he wants to stay and have a chance to turn things around, but the board will decide that.

If McIntyre remains manager, he says the club will need to change culturally, but he wouldn't be drawn on exactly what he meant.

But one thing is clear, whoever is the Dundee manager next season, there's a big rebuilding job to be done over the summer.

Players are out of contact and many will leave Dens, their loan spells up. Preparations for life in the Championship will start before the season ends.