The gang's stolen lorry broke down after only 600 yards with £20,000 worth of Walkers products aboard after they filled up the tank with emissions scrubber. The incident took place at an industrial estate in Kintore, Aberdeenshire, shortly after midnight on Saturday.
Derek Mitchell, managing director of Caledonian Logistics, whose firm was targeted, said they must have made a mistake in the dark. He added: "They filled the tank with AdBlue, which is used after the burn to clean the exhaust gases. It's an emissions regulator.
"It was obviously dark in our yard and they have seen something with what looks like a fuel nozzle and filled up the tank. It was lucky for us. One of our operations directors came in at 4am and the truck was situated about 600 yards from our depot on the road."
Jim Walker, joint managing director of the biscuit firm, said they had been "incredibly lucky".
Police are examining CCTV footage and are appealing for witnesses.