It has been a while since Hearts fans had to choose between club and country.

The couple of thousand who travelled up to Alloa rather than across to Ibrox were rewarded in the end by a gritty victory that takes them nine points clear of Rangers at the top of the SPFL Championship.

Their start to the season is record breaking. Since the introduction of the 10-team second tier, no side had won more than 22 points in their first quarter of matches. Unbeaten, and with eight wins out of nine, Hearts have 25. This wasn't their most free-flowing, attacking victory, but with captain Danny Wilson forced off injured at 0-0 with 10 minutes to go and all three substitutes used, it was an extraordinary escape.

"Will people look back at the end of the season and say 'How did you play at Alloa?'" asked Robbie Neilson, the Hearts manager. "Nobody's going to care. We've lost our captain, we're down to 10 men. We probably would've taken a 0-0 there. But there was still that belief."

Hearts stuttered. Billy King was most lively, but could not provide the final product. Twice in the first half he skipped past his marker and drove towards the by-line. On one occasion, the cross was poor. On the second, he was upended by Ben Gordon - who was booked - but from the dangerous free kick all King could do was put his cross straight out for a goal kick.

When the goal finally came, it was just as scruffy. Adam Eckersley swung in a free kick, the ball took a deflection off the unfortunate Kyle Benedictus and crept into the bottom-right corner. The heartbreak for the hosts was that it had come after a period of intense pressure from them. With 15 minutes to go, perhaps realising a single strike might earn an unlikely victory over their unbeaten visitors, Alloa had surged on the offensive.

Kevin Cawley flicked the ball past a defender, but his shot was blocked by another before Ryan McCord's follow-up was blasted wide. Hearts were rattled. Robbed in possession by Alloa, they let Edward Ferns dart down the right and into the box. His shot, aimed at the top corner at the near post, ruffled the side netting.

Their period of pressure was mirrored by one just as unproductive at the end of a dull first half. A Hearts clearance was quickly and cleverly played back by Cawley into the path of Liam Buchanan. His cross beat Neil Alexander, but not the towering head of Alim Ozturk. Then Graeme Holmes slipped the ball between the Hearts centre-backs and into the path of Cawley.

Clean through, he took a touch to go around Alexander, but the goalkeeper somehow stretched out a hand to palm it away.

It was as good as the goal Hearts didn't have at the other end. Their best opportunity of the first half fell to Jamie Walker, though it was hardly a chance. From far out, he spun around and fired a low shot which crashed off Craig McDowall's right-hand post.

"My players deserved to win the game," said Barry Smith, the Alloa manager. "Our team is part-time, we train two nights a week. Robbie's got them in doing extra sessions. And could you tell the difference there today?"

The difference, sadly, was in the points.

Alloa Athletic (4-4-2): McDowall; Doyle, Gordon, Benedictus, Docherty; McCord, Holmes, Simmons, Cawley; Buchanan, Spence (Ferns 54). Not used: Tiffoney, Meggatt, Marr, Hetherington, Asghar, Couser. Booked: Gordon 36, Simmons 38, Doyle 50.

Hearts (4-2-3-1): Alexander; McGhee (Paterson 51), Ozturk, Wilson, Eckersley; Gomis, Buaben; King, Walker (El Hassnaoui 73), Carrick (Nicholson 45); Sow

Not used: McHattie, Holt, Pallardo, Hamilton. Booked: King 55.

Referee: Calum Murray.

Att: 3067.