Update: 4:01PM Harlequins secured a place in the semi-finals that will decide the champions of English rugby after edging past Bath 19-16 to climb above their opponents into fourth place on the final day of the regular Premiership season.
Saturday's win was Harlequins' fifth in succession and completed an impressive revival in which the Twickenham Stoop side also defeated Exeter, Leicester, Sale and London Irish on their way to the knockout phase.
Now Quins will be away to regular season table-toppers and London rivals Saracens in the play-off semi-finals.
George Ford scored a stunning solo try for a Bath side coached by his father, Mike, in the first half but Quins emerged victorious on the back of a converted try by England full-back Mike Brown and four penalties from the boot of former New Zealand international Nick Evans.
"There was a huge amount of tension and I'm incredibly proud of the belief within that group," said Harlequins boss Conor O'Shea.
"We've won 13 out of our last 17, we've won our last five in a row, we've had to scrape wins but mental strength is a huge thing," the former Ireland full-back added.
Saracens won 39-17 when the teams met at Wembley in March but O'Shea was adamant his side could still cause an upset.
Meanwhile Saracens boss Mark McCall was furious after a touch judge's intervention had flanker Justin Melck sent off early in the second half of their 31-27 loss away to Leicester.
Melck was shown a red card after appearing to eye-gouge Leicester hooker Neil Briggs, who subsequently said the officials had got it wrong.
"We are hugely disappointed with the decision," said McCall, who decided to rest most of his leading players ahead of the play-offs and a European Cup semi-final with defending champions Toulon.
"It seems very unusual for a touch judge, who is in the position he was in, to make that kind of call and decide not to consult the fourth official.
"Their player did not complain and subsequently said it did not happen."
Leicester boss Richard Cockeril, whose reigning champions will play East Midlands rivals Northampton in the play-offs, said: "Neil Briggs was the supposed victim and he said there was no eye-gouging."
Cockerill added: "Saracens and Northampton have been the best sides all year.
"But we are a good side when we get it right. We have done well against Northampton in the last few years, it will be a hell of a game, local derby, semi-final... all the pressure is on them."
Northampton secured a home semi-final against their familiar foes after a 74-13 thrashing of Wasps,
They, remarkably, fell 13-0 behind before roaring back against the under-strength visitors who were holding key players back for their European Champions Cup play-off first leg against Stade Francais next week.