Ten-man Partick Thistle were given a scare by Highland League outfit Cove Rangers but held on to move into the fourth round of the Scottish Cup.
The visitors missed a penalty when 2-0 down but pulled a late-goal back to set up a nervy finale for the First Division side.
Ross Forbes opened the scoring in spectacular fashion, firing into the back of the net from 25 yards out after 13 minutes.
Thistle had Steven Craig sent-off in the 27th minute for his reaction after being fouled by Eric Watson.
But the 10-men went 2-0 up thanks to Alan Redford, who headed past his own goalkeeper from six yards out.
Cove were awarded a penalty in the 59th minute after Conrad Balatoni's handball, but substitute Danny Milne's spot-kick was saved by Scott Fox.
Milne made amends with a superb finish from 30 yards out with four minutes left, but the Glasgow side held on to progress.