Scotland battled through the loss of more key players to injury to take Wales to the wire before eventually falling short to the Grand Slam-chasing visitors.
Gregor Townsend's side overcame the loss of Tommy Seymour and Blair Kinghorn to injury as the Welsh lay siege to the Scots in the opening half, before a stirring fightback saw the dark blues fall just short of a famous reverse.
After an early spell of Welsh pressure, Scotland showed some strong carrying inside enemy territory, culminating in an offside penalty that Finn Russell knocked through the posts to break the deadlock on 11 minutes.
The response from the title-chasers was swift and deadly. After running the ball down the middle Wales took advantage of a three-on-two on the left wing to send Josh Adams over the line.
Gareth Anscombe added the extras to give the men in red a 7-3 lead.
Winger Darcy Graham, making his first start, announced himself on the match with a jinking break from the 22 after 20 minutes, and the resultant pressure brought another penalty that Russell slotted from beneath the posts.
Anscombe restored a four point lead after Stuart McInally fell foul of referee Pascal Gauzere, but more worrying for the Scots now was a mounting injury toll.
Tommy Seymour could not carry on after a blow to the body, and full back Blair Kinghorn hurt his ankle in contact just five minutes later but soldiered on while limping badly.
Under the cosh as they tried desperately to regain their composure, Wales hammered at the Scots defensive line before crashing over through Jonathan Davies.
With the score out at 15-6, Kinghorn was replaced by Adam Hastings into a makeshift backline for the luckless hosts.
Scotland were out of sorts and the intensity they had shown drained out of them as they tried to regroup. Red jerseys sensed the chance to twist the knife and had another overlap after Anscombe's penalty attempt struck the post and fell kindly to Davies.
Hastings raced to make the try-saving tackle, and keep his team in the contest.
A botched line-out invited Wales to pile on yet more pressure with a five metre scrum as the clock went red - a huge defensive effort and a spilled ball saw half time arrive to audible sighs of relief from the Scots.
The unlikely figure of prop Allan Dell had Murrayfield on its feet as he ploughed 30 metres up field but the chance was twice butchered by Russell - first throwing too low for WP Nel, then missing Byron McGuigan as he tried to move the attack wide.
The dark blues had gained a foothold at last and applied pressure through the maul in the shadow of the Welsh try line. McInally's attempt to barrel over was held up, and slow ball off the resulting scrum allowed Wales to win a vital turnover with 54 minutes on the clock.
A massive lineout steal from Jonny Gray kept Wales under pressure though, and this time Scotland found their killer touch. Another huge maul saw the Scots go through the hands - McGuigan broke and Graham finished in the corner to fuel hope for the home side.
In rugby, momentum is everything and Scotland were not about to relinquish it this time. McGuigan chased Russell's grubber into the back field and the pack return the ball to dark blue hands inside the 22 once more.
Hamish Watson, an earlier blood replacement for five minutes, had a huge impact when introduced on the hour, carrying and bouncing through tackles and putting Wales on the back foot.
The visitors were on the rack and, when presented with an opportunity to kick three points, Scotland instead opted for the lineout five metres out.
Murrayfield roared its approval but the Welsh were not fazed and superb defensive discipline won the ball back after a mountain of Scots phases 22 metres out.
Wales had not threatened since the break but with five minutes to play they remained four points ahead and still in control of their Grand Slam destiny.
After bundling Price into touch they looked after the clock and won a penalty in front of the posts. Time went dead and Ancombe's chip through ended a contest that, having threatened to be a blow out, ended only in credible failure for Scotland.
Townsend leads his wounded and weary side on to Twickenham for a daunting finale to the 2019 championship against England next Saturday.Blair Kinghorn 5 - Beaten easily by Adams at the first try, then lost the ball in contact as he injured his ankle.
Tommy Seymour 5 - Went down injured in the 20th minute, bravely rejoining the action briefly, before making way.
Nick Grigg 6 - Looked after the ball much better but found Davies in red hot form up against him.
Peter Horne 6 - Did not have the influence he would have craved in a trying midfield contest.
Darcy Graham 8 - A fine first start as he carried hard, was solid under the high ball and scored his first try for his country.
Finn Russell 7 - Blew hot and cold with some missed opportunities and a beautiful delivery to set up the first try.
Ali Price 6 - Complained bitterly about Welsh slow ball tactics at the breakdown as he scrapped to get the attack going.
Josh Strauss 6 - Hard carrying shift for the back row enjoying a renaissance in the test arena.
Jamie Ritchie 7 - Great workrate up against some of the best in the business and handy in kick chase too.
Magnus Bradbury 7 - Charged with bringing an abrasive front to the pack he relished the physical side of the match.
Jonny Gray 7 - A better day at the office for the lock, including a vital lineout steal that led to Graham's try.
Grant Gilchrist 7 - Carried really hard and marshalled an improved lineout.
WP Nel 6 - Reliable anchor at the scrum after returning from injury.
Stuart McInally 7 - Led from the front with big hits and carries.
Allan Dell 7 - Useful in the loose but doubts persist in the set piece.
Replacements 7 - Adam Hastings and Byron McGuigan did a sterling job when called into action early, with Hastings in particular showing up well in an unfamiliar full back berth. Hamish Watson provided a huge impact after the hour.