Laura Delany scampered a leg-bye off the final ball of a thriller against Scotland in Lahore last night to give Ed Joyce a winning send off at the end of his six years as Ireland head coach.

The nerve-wracking one-wicket victory drew the Girls in Green level with their opponents in the six-team World Cup qualifying event, but four points will not be enough to see either side reach the finals.

Kathryn Bryce was again the tormentor for Scotland, as she has been so often during Joyce’s reign, hitting a superb 131 not out to propel her side to 268-7 — a total Ireland had never chased successfully in a one-day international.

Sarah Forbes and skipper Gaby Lewis built the perfect platform, though, with an opening stand of 109 in 19.5 overs before a mix-up saw the former run out for 55, with Amy Hunter popping up a catch off bat and pad two balls later.

Lewis stoked a couple of sumptuous drives past extra cover, and found the boundary nine times in all but her dismissal, caught behind for 61 from 72 balls, swung the pendulum back to Scotland.

Delany joined Orla Prendergast, who was playing her 100th international, and the pair added 41 in good time.

Prendergast was lucky to survive an lbw appeal on 30 but had only added another three when she chipped to mid-wicket, and sensing the game was theirs Scotland piled through the breach with three more quick wickets.

Enter Jane Maguire at 209-7 to play the highest and best innings of her international life — 28 off 24 balls, nearly all swung to leg — as she and Delany added 53 from 6.4 overs to wrest back control.

When Maguire was finally caught in the deep, Ireland needed seven from the final over.

Ava Canning hit a crucial boundary from the third ball but was then bowled, leaving Cara Murray to scramble a leg-bye to level the scores, and Delany to shin the winner.

The former captain finished 57 not out from 63 balls.

On the flight home this weekend, Joyce can look back with satisfaction at the progress his charges have made under his guidance, with a series win over Sri Lanka last year, and beating England and Pakistan, the stand out performances.

He will know, though, that Ireland probably should have crowned his time in charge by qualifying in Lahore, having got themselves into a position to beat Pakistan, and then throwing away cast iron chances against the West Indies and Bangladesh.