England wrapped up their first overseas Test victory for more than two years, downing Sri Lanka at their Galle stronghold by 211 runs with a day to spare.

There have been 13 games since the last success on foreign soil – taking in trips to Bangladesh, Australia, India and New Zealand – but England banished their travel sickness in style, led by Moeen Ali’s best match figures away from home.

He took four for 71 as the hosts were rolled for 250, and eight for 137 overall, with fellow spinner Jack Leach on hand to dismiss three of the top six.

The final result might have seemed almost inevitable at the start of play, with Sri Lanka pursuing a world record chase of 462 or the equally unlikely prospect of batting two full days for a draw, but the scale of the achievement should not be underplayed.

Galle is considered a home banker in these parts, with Sri Lanka losing just four of their previous 18 Tests here in the past decade, and England winless in their four prior visits to this picturesque 16th-century fort.

At 103 for five on the first morning Joe Root’s side seemed to be heading for more disappointment, but fine centuries in either innings from debutant Ben Foakes and opener Keaton Jennings provided the resistance and a three-strong spin attack flourished with 16 of the 20 required wickets.

The openers began the day well with a 51-run stand, rationing England to a solitary chance in the first hour – Dimuth Karunaratne uncharacteristically dropped by Ben Stokes at slip to deny Moeen.

Then Kaushal Silva (30) gave it away, stooping to sweep Leach and falling lbw after being beaten in the air. Having made the mistake he compounded it, burning a DRS review on his way.

Less than three overs later Karunaratne decided he would take the aerial route against Moeen, an ill-judged scheme that saw him club a firm return catch back at the off-spinner.

Stokes entered the attack just in time to strike another blow before lunch. One ball after Dhananjaya de Silva successfully overturned a caught behind decision, Stokes tightened up his line and took an indisputable edge that nestled safely in the hands of Root.

Kusal Mendis and Angelo Mathews cooled the charge in the afternoon, putting on 45 as Leach searched for his rhythm at one end and Stokes bombarded them with a snarling spell at the other.

The all-rounder deserved reward and would have had it when he hurried Mathews with a short ball on 17. The batsman turned a pull straight to James Anderson at midwicket, where a regulation catch popped out.

While he made the most of it, reaching his half-century, Mendis gave his wicket away on 45. One ball after a loose lofted drive off Leach, he attempted an identical stroke and was caught by a back-pedalling Moeen.

Dinesh Chandimal can at least claim to have been beaten authentically, Leach drawing him in on a middle-and-leg line and finding sufficient turn to clip off stump.

What little hope there was in the home dressing room was extinguished in a hurry by Moeen. He accounted for Niroshan Dickwella with the first ball after tea, Stokes making amends for his earlier drop with a sharp take, then added a soft shot from Mathews (53) to his collection.

Moeen grabbed a fourth wicket of the day, Akila Dananjaya, to overtake his seven-wicket match haul in Durban three years ago, and Adil Rashid did for Dilruwan Perera.

Retiring hero Rangana Herath bowed out in disappointing fashion, run out sprawling to make his ground, but was clapped on and off the field in a show of respect by his opponents.

Among those celebrating in the middle just four were present in October 2016 at England’s last away win in Chittagong – Root, Stokes, Moeen and Rashid.