IT had been a tense five weeks but here it was at last, the finale of Vigil, the made in Scotland, submarine-set thriller.

Would everyone make it safely through to the end, or might the combined splutterings of inaccuracy-obsessed submariners everywhere blow the whole shooting match out of the water early doors?

True, life aboard the unusually spacious HMS Vigil has had more than its fair share of drama. At times, such was the turmoil and ineptitude on display, you would not have left this crew in charge of a rubber duck, never mind a nuclear-powered submarine.

Precision was not the point though, this being a piece of fiction. In its favour, Tom Edge’s drama had a solid gold cast and a strong if occasionally baffling script (minus some snoozy moments when the story moved onshore).

Above all, Vigil had pluck and ambition. While this was a tale made for the small screen, the action scenes could have passed muster in a cinema.

READ MORE: No Line of Duty but Jones makes impact

When we left Amy Silva (Suranne Jones) at the end of episode 5 (spoilers ahoy, shipmates!) it looked as though the jig was up for the DCI.

Lamped by a sonar operator who turned out to be an agent for the Russkies, Amy had been stuffed in the same kind of missile casing that had been Martin Compston’s home for the past five weeks. She would have been a goner in the first ten minutes if someone had not walked in on the villain just in time. A lot of that went on in the final hour.

Entombed in a tube, all Amy could do was scream for help and think back to the love she had driven away, fellow copper Kirsten (Rose Leslie), and the daughter who had lost her father (Amy’s husband) in a car accident.

Eventually, Amy remembered she knew Morse code. As luck would have it, there was someone in the control room who could interpret the message (shouldn’t all sailors know Morse code?) and with one bound, and a quick vomit, Amy was free to nick the villain.

But she had to avoid him killing her first. The chase through the submarine was heart in the mouth stuff, the corridors bathed in red, lights fizzing and flashing.

Amy, lithe and muscular, sweating for Scotland in her vest, looked positively Ripleyesque as she hunted the alien presence in her midst.

Meanwhile, water was pouring into the boat courtesy of the bad guy’s earlier handiwork - he had been a very busy boy - and HMS Vigil was heading for Davy Jones’ locker. The unluckiest submarine in the world looked to be about to meet its fate.

But onboard and on shore, the women were not going to let that happen. Though men were predominant, especially at the boss level, it was women who made the key moves, much as in Line of Duty (the two dramas share producers).

The men squared off and honour was saved, the anti-Trident MP agreeing to keep quiet “this time”. Not before he had a mini rant about getting nukes out of Scotland within his lifetime, however.

It had all been a Russian plot to make the nukes in Scotland seem unsafe and steer MPs into cancelling a replacement deterrent, which sounded a bit rum. Who was to say it would not have had the opposite effect?

READ MORE: Was Vigil filmed on a submarine?

There was no time to worry about any of that because there was hair to be stroked and a relationship to repair. Amy and Kirsten, with their shared love for justice and nice coats, had some talking to do.

The last word went to our Martin, which was only fair given he had been stuffed in a tube for a month and a half (call your agent, mate). As poignant music played he banged on in his last video testament about what a wonderful world it was.

The Russkies were back in their box and the planet was safe once more, albeit courtesy of enough explosive power to blow us all to kingdom come. Never mind such details for now, this had been a blast.