Hibs looked set to apply the coup de grace to the Jambos’ European ambitions when Anthony Stokes netted his 22nd goal of the season from the penalty spot early in the second half at Easter Road on Saturday.
But visiting boss Jim Jefferies produced two inspired substitutions in Calum Elliot and Suso Santana, the latter levelling 18 minutes from time before Obua’s 89th-minute winner saw Hearts close to within three Scottish Premier League points of their arch-rivals with two games remaining.
The result also sealed Hearts’ first unbeaten season in derbies for seven years.
Michael Stewart was axed from the visitors’ squad, fuelling rumours he has played his last game for the club.
Jefferies refused to confirm on Thursday whether the out-of-contract midfielder would feature again this season but his exclusion today told its own story, while Eggert Jonsson, Laryea Kingston, Ryan Stevenson and Ian Black were all recalled.
Hibs captain Chris Hogg made a surprise recovery from a back injury, while Liam Miller shook off a calf problem in one of three changes for the suspension-hit hosts, who also drafted in Steven Thicot and Colin Nish.
A predictably frenetic start saw both goalkeepers forced into excellent early saves.
First, Graeme Smith got down well to turn behind a 20-yard David Templeton effort before Jamie MacDonald produced an even better stop from a low Derek Riordan finish after Colin Nish’s flick had played in the forward.
A crossed Kingston free-kick on the quarter-hour mark evaded everyone, while Paul Hanlon failed to get enough power or accuracy on a 15-yard header from David Wotherspoon’s floated cross.
Templeton’s 25-yard blast almost hit the corner flag but Kingston showed his team-mate the way with a superb 24th-minute strike that rebounded off the post.
Referee Dougie McDonald appeared determined to keep his cards in his pocket, despite penalising a number of crunching tackles.
He risked the wrath of the home fans for waving away what appeared a body check on Stokes by Marius Zaliukas as the striker looked to burst clear.
Chances began to dry up but the statuesque Nish was proving a useful outlet for Hibs and teed up John Rankin for a vicious half-volley MacDonald could only parry seven minutes before half-time.
The home side were nearly gifted a calamitous own goal seven minutes into the second half when MacDonald allowed a Lee Wallace backpass to run under his foot. Fortunately, the ball went wide.
But Hearts’ luck turned less than 60 seconds later when McDonald adjudged Zaliukas to have tripped John Rankin on the edge of the box and pointed to the spot.
The visitors protested furiously and Wallace, Ruben Palazuelos and Obua all delayed the taking of the penalty.
But Stokes eventually stepped up in the 55th minute to send MacDonald the wrong way.
Hearts threw on Elliot for the ineffective Gary Glen, while Hogg briefly left the field for treatment on a hand injury.
Kingston blazed over from 30 yards as the visitors struggled to respond, forcing Jefferies to introduce Suso for Stevenson midway through the half.
Both substitutes were involved in the equaliser.
Hogg initially failed to deal with Elliot and a collision between Smith and Ian Murray compounded matters as the ball broke to Suso to fire his sixth goal of the season into an unguarded net.
Hibs boss John Hughes brought on Alan Gow for Wotherspoon four minutes later, moments before Zaliukas picked up the first booking of the match for kicking the ball away.
Hogg followed nine minutes from time for a crude challenge on Templeton.
The yellow cards continued when Murray was booked for a foul on Zaliukas in the 88th minute before Obua grabbed the most dramatic of winners 60 seconds later.
Templeton’s cross looked harmless enough but Hanlon, Murray and Smith all failed to deal with it, giving the Ugandan the simplest of tap-ins at the far post.
There was still time for Elliot to be booked in stoppage time as Hearts held on.