EDINBURGH, Scotland — Greig Laidlaw booted 22 points in his first test start in nearly a year to guide Scotland to a 32-26 win over France on Sunday, kickstarting the team’s Six Nations campaign after last week’s mauling in Wales.

Right winger Teddy Thomas crossed for two tries in the opening 27 minutes to help the French to a 20-14 lead at halftime at Murrayfield.

They were also six points ahead at 26-20 going into the final 20 minutes, but Laidlaw booted four penalties in a row to ruthlessly punish France’s indiscipline. The scrumhalf has been absent from his national team because of injury and involvement in the British and Lions tour of New Zealand.

“It’s felt like a long time,” said Laidlaw, a former Scotland captain. “I’m not a very good watcher.”

Laidlaw finished the game at flyhalf, after Finn Russell’s 65th-minute withdrawal, and a haul of six penalties and two conversions off first-half tries by Sean Maitland and Huw Jones. He didn’t miss a shot at goal.

The Scots were hyped up coming into the tournament after beating Australia home and away last year, but were overwhelmed in a 34-7 loss to the Welsh in round one

“If you lose the first match and are serious about the competition, the maths is simple,” Scotland captain John Barclay said. “We knew we had to put in a performance after last week.”

France has started with back-to-back defeats after losing to Ireland 15-13 in Paris last week thanks to an injury-time drop goal.

“As long as we don’t have discipline, then we won’t win matches. It’s a case of staying patient and playing to the rules,” France captain Guilhem Guirado said on French TV. “We can’t keep losing like this because of us and our mistakes.”

Thomas lit up Murrayfield with a superb first try, the winger handing off Russell, sidestepping Peter Horne and then galloping past Stuart Hogg to reach the line. And when Maxime Machenaud booted over a penalty soon after, the Scots found themselves 10-0 down before they had even got started.

They responded by going right up the middle as Jonny Gray barged over Machenaud with a shuddering shoulder barge. Grant Gilchrist and Russell then moved the ball quickly out to Maitland to dot down in the corner.

Thomas pushed France further clear again when he picked up the ball as France swept left to right and chipped it over Hogg before charging for the line. Laidlaw came across to cover but a wicked bounce fooled the scrumhalf, allowing Thomas to collect and score.

Scotland was harder to shake off than last week, though, and hit back again.

Hogg’s drive split the French defence and with Les Bleus scrambling for cover, Jones spotted a gap and raced in to score under the posts.

The teams then exchanged a pair of penalties apiece as Machenaud and Baptiste Serin knocked over for France, with Laidlaw responding for Scotland.

Serin kicked another penalty as the French went through 20 bruising phases, yet Laidlaw replied again with two penalties to put Scotland level at 26-26 with 16 minutes left.

France conceded yet another penalty on 70 minutes, which Laidlaw once again punished to put Townsend’s team in front for the first time. The Clermont Auvergne scrumhalf then made sure of the victory with three minutes left as he again fired over