Blackpool remain nine points adrift of safety – with Brighton currently just above the drop zone themselves on 29 points – but back-to-back wins at Bloomfield Road have given Lee Clark’s side renewed hope.
It was former Tottenham midfielder O’Hara who did the damage on 75 minutes with a stunning strike, and it broke Brighton’s three-game winning streak away from home.
The visitors started strongly, though, and had the first chance of the game in the eighth minute as Tony McMahon allowed a long ball to slip through his legs, which put Sam Baldock in on goal but Peter Clarke blocked his effort from 12 yards.
Both sides were struggling to put together any meaningful attacks as neither was able to come to grips with an atrocious playing surface at Bloomfield Road.
However, Baldock almost broke through after 24 minutes as he latched on to a ball over the top but Blackpool keeper Ell Parish just grabbed the ball before the Brighton striker could pounce.
Blackpool threatened to take the lead on the half hour when O’Hara’s free-kick looked destined to be knocked home by the unmarked Clarke before Brighton keeper David Stockdale claimed the ball just ahead of the defender.
Parish then produced a super save to deny Brighton after 35 minutes as Danny Holla’s free-kick was headed on target from six yards by Gordon Greer, only for Seasiders stopper to spring high and tip the ball over the bar.
Brighton again started the second half on the front foot and forced a smart save from Parish as he held Holla’s right-footed strike from 20 yards low down to his right after 51 minutes.
Blackpool then had penalty claims turned down after 59 minutes as Clarke’s strike from the edge of the area appeared to hit a Brighton arm in the box – but referee Seb Stockbridge waved away the protests.
The impressive Parish was almost caught out in the 68th minute when he delayed his clearance after a back-pass and his kick was nearly charged down by Inigo Calderon.
But that lapse was quickly forgotten when Blackpool took a shock lead with just 15 minutes remaining.
O’Hara, a free transfer in November, curled a sensational left-footed free-kick over Brighton keeper Stockdale and into the back of the net from 35 yards.
Brighton threatened to strike back after 80 minutes as Solly March twisted and turned inside the area but the imperious Clarke cleared before Joe Bennett’s cross was headed wide by Leon Best from six yards.
Blackpool came close to doubling their lead after 87 minutes as Mark Waddington slipped in Steven Davies down the left but the forward’s left-footed strike from 12 yards was held by Stockdale at his near post.