Kyle Benedictus's late goal gave Championship side Raith Rovers victory over Hamilton Academical in the Scottish League Cup.
Raith took an early lead through Iain Davidson's deflected strike.
Former Stark's Park striker Christian Nade headed Premiership Accies level midway through the second half.
But Benedictus nodded the hosts ahead again from Ryan McCord's free-kick and this time Hamilton could not find an equaliser.
Ray McKinnon's side go into Thursday's third-round draw.
The Kirkcaldy side wasted little time in stating their intent.
Hamilton failed to deal with McCord's corner and, after referee Don Robertson dismissed the visitors' appeals for handball, Davidson's effort from inside the box was diverted into the bottom corner.
Raith pushed for a second and Grant Anderson's shot across goal was well saved by keeper Michael McGovern before Lewis Toshney struck a half-volley wide.
Hamilton were offering little in attack but Ali Crawford did draw a save from Kevin Cuthbert before heading Gramoz Kurtaj's cross wide from 10 yards.
Cuthbert did well to push Jesus Garcia Tena's free-kick over but, from the resulting corner, Accies equalised.
Crawford's delivery was nodded on by Kurtaj and Nade flicked the ball in just in front of the keeper.
However, it was a set piece at the other end that settled the tie.
McCord again provided the assist as his free-kick was headed in by centre-half Benedictus.