But beating France for the second time this year proved to be a game too far as Fabien Galthie's men claimed a vital victory in Edinburgh thanks to Virimi Vakatawa's try and 17 points from the boot of Thomas Ramos.
The first half was a battle of the kickers, with Duncan Weir ensuring Scotland went in level at 12-12 after successfully knocking over his four attempts.
But the stand-off could only add three more points after the break to leave the Scots all but out of the reckoning for the competition's first-place play-off in a fortnight.
Scotland will be idle next week after seeing next week's clash with Covid-hit Fiji axed – but France can book their place in the final with victory over Italy in Paris.
It was evident early that keeping referee Wayne Barnes on side would be key for both teams – but neither had much joy on that front.
It was Scotland who found themselves in the naughty books in the opening 10 minutes, with Chris Harris pinged for not rolling away and Ramos slotted the opening penalty.
Blair Kinghorn's needless body check on Antoine Dupont cost the Scots decent territory but the big wing redeemed himself shortly afterwards when he scrambled back across his own line to prevent Vakatawa touching down from Gael Fickou's clever grubber kick.
However, Ramos did kick over again as Les Bleus were forced to settle for three points.
Scotland identified Vincent Rattez as the weak spot in the visitors' defence, targeting him with a series of high balls. The ploy paid off as the wing found himself pounced upon by three white jerseys.
Scotland's trusty maul attack did not do much to dent the French rearguard but Weir did the necessary with his first penalty to halve the deficit.
France were now the team on the wrong side of Barnes, with Gregory Alldritt penalised for stopping Scotland getting clean ball as he flopped on a ruck. Weir split the posts again to level the scores.
France then appeared to have let a good attacking opportunity slip when Matthieu Jalibert threw a loose pass but Ramos had other ideas, slicing his way through the Scottish line with a lacerating run that cleared the space for Jalibert to nail a surprise drop-goal.
With the clash effectively a semi-final to decide who will play for the trophy in a fortnight, both teams were taking points whenever they were on offer.
Weir brought the hosts level again after another French tackler found themselves unable to roll out of Ali Price's way – only for Matt Fagerson to immediately hand Ramos the chance to boot France back in front with another breakdown infringement.
Weir, however, did fire Scotland level at the break following Alldritt's knock-on, but only after the Dark Blues defence – which has shipped just seven tries in the last seven games – held firm on the line to block a desperate charge from Galthie's forwards.
It took France just two minutes after the restart to produce the game's first moment of real quality as Fickou's off-load released Rattez surging through a huge gap before he handed over to Vakatawa to score the opening try.
Scotland responded with Weir's fifth penalty but holding off the rampant French pack was becoming an ever harder task as Les Bleus grasped the set-piece upper hand.
Ramos continued his flawless evening with the boot to kick another penalty which moved his team seven in front.
France did offer some late hope with a number of sloppy mistakes but Townsend's team were unable to capitalise. And they were left to sample the bitter taste of defeat for the first time since February when Stuart Hogg's failure to find the corner with a stoppage-time penalty sealed France's win.