Gainsborough Trinity were left with a mountain to climb ahead of their FA Trophy semi-final second leg as they fell to a 3-1 defeat to Wrexham at the Racecourse.
Second-half goals from Adrian Cieslewicz and Neil Ashton gave the Dragons a two-goal advantage ahead of the return leg at the Northolme this coming Saturday.
Wrexham went ahead on 18 minutes. Brett Omerod's stinging effort was blocked by Jan Budtz and in swept Danny Wright to score.
Trinity hit back on 27 minutes. Jamie Yates battled into the Wrexham box on the left-hand side and crossed to Darryn Stamp who was waiting at the far post to head home with Chris Maxwell well beaten.
After half-time Trinity looked strong, with Stamp again the main outlet for their attacks.
However, Wrexham went ahead on 65 minutes. Substitute Adrian Cieslewicz burst into the box on the left-hand side and blasted the ball past Budtz.
After a long period of pressure Wrexham earned a corner in stoppage time. Joe Clarke delivered the ball in it was flicked on by Danny Wright, Andy Morrell's effort was blocked and Ashton smashes home from close range.