Jason Cummings spared Hibernian's blushes with an injury-time winner as a day of celebration turned into one of relief.

Hibs' marked club legend Pat Stanton's 70th birthday by giving away 7,000 tickets.

But for spells in-between, most of the 11,021 crowd endured another frustrating performance as the Blue Brazil came from behind to lead in the second half. But substitute Cummings applied the icing on the cake as Alan Stubbs' side ended a run of three-straight Championship losses with a much-needed win over the part-time basement outfit.

The feelgood factor was evident when the hosts went ahead through Jordon Forster in the 26th minute. Scott Allan's free kick found Matthew Kennedy on the right and the winger's cross was headed in at the back post by the centre-half.

No-one, though, could have anticipated the whirlwind start to the second half as the visitors stunned Hibs. Sean Higgins notched Cowdenbeath's equaliser after 50th minutes when he met John Armstrong's low delivery into the box to slide a low shot past Mark Oxley.

The visitors then carved Hibs open for the second. Higgins' reverse pass set Callum Gallagher free in the box and the on-loan Rangers striker chipped a cross to the far post. Paul Hanlon made a mess of his clearance and Jon Robertson nipped in to direct a shot past Oxley. "At 2-1 I was thinking I must have run over a black cat or something," said Stubbs. "But the lads showed spirit to keep going."

The arrival of new striker Dominique Malonga helped spark a revival, the former Cesena player thundering home a penalty in the 78th minute after Forster was felled by Armstrong.

The winner arrived in the fourth minute of injury-time. Kennedy's cross into the area fell to Cummings and the marksman cooly slotted a right-foot shot into the net from close range.

Cowdenbeath manager Jimmy Nicholl said: "We've scored two goals away from home and we end up conceding another three, I'm at my absolute wits' end about what to do."