Nicky Clark and Cammy Smith both hit doubles as Dundee United secured a 6-2 Betfred Cup win at Brechin.
Further goals from Ian Harkes and Calum Butcher either side of the interval had United on easy street but the home side quickly pulled two goals back through Kieran Inglis and Rory Currie.
Smith netted on the hour mark to give United a cushion and the three points were well on their way back to Tannadice when he scored again in stoppage time.
Clark scored on the rebound in the 15th minute after a Harkes effort was stopped and the former Rangers man found the top corner three minutes later.
Matthew Todd hit the post for Brechin before having an effort cleared off the line and Butcher drove home from 25 yards five minutes before the interval to make it 3-0.
American midfielder Harkes scored with a neat finish from 18 yards two minutes into the second half but Brechin scored twice in three minutes.
Former United player Inglis netted from the spot and Rory Currie converted a low cross at the back post to change the complexion of the game.
However, substitute Smith produced a smart finish from close range on the hour mark to ease any nerves from Micky Mellon's side.
And the former Aberdeen and St Mirren player found the bottom corner from 18 yards deep into added time to wrap up the victory.