John Grant fired Alloa into the second round of the CIS Insurance Cup with a stunning extra-time winner over Forfar.
Alloa had taken the lead when the game was only four minutes old, Graham Brown heading home a Kieran McAnespie cross.
The visitors were the better side thereafter, but Gribben curled home a great finish from 18 yards three minutes into injury time.
Forfar's celebrations were shortlived, however, as Grant quickly netted with a magnificent shot from 18 yards.
Forfar: Murdoch, Keogh, King, Dunn, Lumsden, Donald (Webster 77), Lunan (Beith 112), Marshall, Fraser (Tosh 65), Gribben, Coyle.
Subs Not Used: Wood, Lynn. Booked: Dunn, Gribben.
Goal: Gribben 90.
Alloa: Creer, Bolochoweckjy, Forest, Townsley, Malcolm, McColligan, Hamilton, Grant, Brown (Hazeldine 70), Sloan, McAnespie (Comrie 70), Hazeldine (McCalum 105).
Subs Not Used: Hutton.
Booked: Townsley, Forest.
Goals: Brown 4, Grant 93.
Ref: Barry Somers