Ireland got their Guinness Six Nations campaign back on track with a hard-fought 22-13 win over Scotland at Murrayfield.

The forecast had been for a storm but in the end it failed to materialise, Ireland only having to deal with a stubborn Scotland, who had not been beaten here in a championship game since 2016.

It was nervy at times for Joe Schmidt, who saw Johnny Sexton depart after 24 minutes with an injury.

Conor Murray, Jacob Stockdale and Keith Earls scored the tries, while Joey Carbery added five points with the boot.

It was simply a matter of getting the win in order to keep their hopes alive and while there will be plenty of work to do during a two-break before a trip to Rome to face Italy, Schmidt will take this one and move on.

The head coach made five changes to the team that underperformed against England, with Rob Kearney, Chris Farrell, Quinn Roux and Jack Conan replacing the injured Robbie Henshaw, Garry Ringrose, Devin Toner and CJ Stander, while Sean O'Brien came in for Josh van der Flier.

Gregor Townsend made four switches to the side that beat Italy 33-20 with hat-trick man Blair Kinghorn benched for Sean Maitland on the wing.

With prop WP Nel and back row Sam Skinner injured, in came Simon Berghan and Josh Strauss, while lock Jonny Gray returned to displace Ben Toolis.

Far from not allowing Scotland to get off to a flying start, Ireland were lucky to concede only three points after Sexton and Bundee Aki both gave away needless penalties.

They continued to ride their luck, with Romain Poite ignoring Scottish calls for a late tackle and a crossing offence, before Murray was on hand to mop up after Tommy Seymour and Sean Maitland failed to deal with Stockdale's chip over the top.

Sexton, limping heavily, badly miscued an easy conversion but Ireland had the lead.

Still, the out-half was able to contribute an intercept and an assist to put Stockdale through the middle after good hands by Peter O'Mahony, who was named man of the match.

The Ulster man, top try-scorer last season, ran in from 50 yards to dot down under the posts, this time Murray took the kick.

Sexton, however, couldn't shake off his problem and, after a number of heavy tackles, had to retire, joining Stuart Hogg, who suffered a shoulder injury moments before, on the sideline.

Schmidt confirmed after the game that his outhalf had failed a HIA.

This was turning into a brilliant Test match and Ireland survived a TMO check in the corner, Rory Best convincing the French referee to check for an earlier forward pass.

It was a momentary reprieve. Murray's kicking game was handing Scotland possession under no pressure and it wasn't long before Finn Russell read Joey Carbery's intentions perfectly and ran 50 yards after intercepting.

Earls hunted the Racing 92 man down but couldn't do anything about the offload to Sam Johnson, who dived over for his first international try.

All the play was in Ireland's half and they survived a 25-phase move, with Stockdale making a try-saving tackle, to lead by two after a roller-coaster first 40 minutes.

The sides went at each other again on the resumption and it took Ireland 16 minutes to find a breakthrough.

Recalled Rob Kearney's incisive run brought Ireland into the opposition half but a wayward pass looked to have ended the move. Instead, Carbery burst through two defenders and made for the try line.

Recognising he was losing the footrace, the Munster man spotted Earls on the outside and looped an inch-perfect pass for the winger, who crossed for his 28th international try.

Schmidt introduced Van der Flier, Dave Kilcoyne and Andrew Porter and the team was lifted by the fresh legs.

Laidlaw made it 19-13 in the 62nd minute with another penalty but Ireland responded by working through the phases in the Scottish half, eventually forcing a penalty, which Carbery slotted.

After that it was a matter of playing the correct areas and waiting for a tired Scotland to make their own mistakes, which came as desperation grew.

Scotland: S Hogg; T Seymour, H Jones, S Johnson, S Maitland; F Russell, G Laidlaw; A Dell, S McInally, S Berghan; G Gilchrist, J Gray; R Wilson, J Ritche, J Strauss.

Replacements: F Brown, J Bhatti, D Rae, B Toolis, R Harley, A Price, P Horne, B Kinghorn

Ireland: R Kearney; K Earls, C Farrell, B Aki, J Stockdale; J Sexton, C Murray; C Healy, R Best (capt), T Furlong; Q Roux, J Ryan; P O'Mahony, S O’Brien, J Conan.

Replacements: S Cronin, D Kilcoyne, A Porter, U Dillane, J Van der Flier, J Cooney, J Carbery, J Larmour.