Hamilton battled their way to 1-0 away success at Morton during a hard-fought Championship performance.
David Moyo put Accies ahead inside the opening 10 minutes and Andy Winter should have made it two soon after with an effort that cracked the bar.
Dougie Imrie's Morton then hit the bar twice inside a minute as a dramatic first half of near misses and sitters came to a close.
Mihai Popescu clipped the post after half-time for Stuart Taylor's Accies side, who fully confirmed their safety in the division at Cappielow.
They sit sixth in the division and four points behind Raith Rovers in fifth with two games to go, ahead of facing the Kirkcaldy side next Saturday. Morton are seventh.
Accies made one alteration to the side that lost 1-0 to Arbroath last week, experienced defender Brian Easton in for winger Josh Mullin.
Taylor's side were competing for a maximum of fifth place but with an ambition of pushing towards the top half, and fully eliminating relegation potential, motivation to perform was high.
They were fortunate to be level when Robbie Muirhead skied over goalkeeper Ryan Fulton's goal from around five yards out on five minutes.
Andy Ryan got the ball at the opposite end of the park a minute later, and his shot wasn't dealt with by Ton goalkeeper Jack Hamilton. Strike partner Moyo was on hand to place a sixth-minute shot into the empty net.
Imrie was left head in hands again on 10 minutes as his team somehow managed to not draw level after Fulton misjudged a ball into his box, Gavin Reilly dragging an effort inside the penalty area wide with nobody in the net.
It was a back and forth game with glaring misses the key narrative. Morton's defence was being opened up time and time again, Winter racing in behind on 22 minutes.
With only the keeper to beat he cracked the crossbar, and four minutes later, he got into the exact same situation and rolled a tame effort into Hamilton's arms.
Reilly got in again on 37 minutes after a scramble in the box, denied by Fulton's legs after a scramble in the away penalty area. Somehow, they weren't drawing level.
It seemed as if it wasn't going to be Morton's day. Multiple deflections took a Muirhead effort onto the bar on 38 minutes and Gozie Ugwu then clipped the bar a minute later as Hamilton rode their luck.
Cappielow number nine Muirhead then had it in the net but a foul on Brian Easton prompted referee Willie Collum to give an Accies foul, much to the bemusement of the home crowd and Imrie.
The striker's free-kick on 43 minutes was the less of a half full of clear chances, a shot from 25 yards sailing over the bar.
He was a man on a mission and only a strong hand from Fulton denied the former MK Dons frontman scoring an excellent half-volley two minutes into the second half.
For how frantic the first 45 minutes were, the second offering of them had the dial turned down.
Each side looked to have spent their entire packet of big chances in the first half, Steve Lawson going somewhat close with a long-range Hamilton free-kick on 67 minutes.
Cameron Blues tried his luck at the other end on 71 minutes before Gary Oliver tried his luck a few minutes later, to no avail.
Popescu's effort was the closest of the second half chances as proceedings entered the final phase. The Hearts loanee glanced a header onto the post and his follow-up was cleaned up in a pile of bodies.
Blues almost caught onto a lob over the top of Hamilton's defence on 89 minutes, but he couldn't apply a controlling touch as he looked destined for a huge chance.
Hamilton broke off some good work by Lawson but it eventually came to nothing, and the away side did enough to grind out three points.
Morton XI: Hamilton, McLean, McEntee, Blues, Muirhead, Ugwu, Brandon, Reilly (Oliver, 72), Russell (McGrattan, 82), Wilson, Ledger (King, 82).
Subs: Bysouth, McGregor, Jacobs, Lyon, Hynes, Easdale.
Booked: King, Ugwu, McGrattan.
Hamilton XI: Fulton, Hamilton (76, Mullin), Popescu, Easton, O'Reilly, Lawson, Spence, MacDonald (Shiels, 90), Ryan (Martin, 45, Mimnaugh, 88), Moyo, Winter.
Subs: Hilton, Smith, Brown, McGowan, Nicolson.
Booked: Martin, O'Reilly.
Referee: Willie Collum
Follow Lanarkshire Live Sport on Twitter via @LanLiveSport, like us on Facebook or find us on Instagram for the latest sports news, pictures and video.