Steven Mackay scored the winner as Elgin City moved into the second round of the CIS Insurance Cup against an Arbroath side reduced to nine men.
Elgin goalkeeper Kieron Renton made several good saves before Mackay's effort from the edge of the box bobbled into the corner of the net.
Iain Dobbins saw a header come off the Elgin crossbar before Barry Sellers had a header cleared off the line.
Sellers and Jamie Bishop were sent off for at the end as tempers boiled over.
Arbroath: Morrison, Rennie, McCulloch, Raeside, Bishop, Dobbins (Voight 86), Scott (Brazil 69), Black (Smith 64), Martin, Sellars, Stein.
Subs Not Used: Cook, Peat.
Sent Off: Bishop (89), Sellars (89). Booked: Dobbins, Scott.
Elgin: Renton, Kaczan (Easton 90), Dempsie, Low, Dickson, Hind, Charlesworth (Booth 60), Campbell, Johnston, Mackay, Gardiner.
Subs Not Used: Main, Finnigan, Knight.
Goal: Mackay 49.
Ref: S Nicholls