Chester-le-Street: England ended Sri Lanka's resistance to win the second Test by nine wickets and complete a series victory.
Dinesh Chandimal made 126 and Rangana Herath 61 as Sri Lanka benefitted from dropped catches at Chester-le-Street to move their overnight 309-5 to 475.
Anderson, the bowler to suffer from England's errors, returned to trap Herath lbw on the way to 5-58.
England faced a target of 79, which allowed Alastair Cook to reach 10,000 Test runs in his unbeaten 47.
Sri Lanka were outplayed in both the first Test and the first half of this match, when they were shot out for scores of 91, 119 and 101.
But they should now have greater confidence travelling to Lord's, where conditions are likely to be much more suited to batting than Leeds and Durham.
Chandimal, unbeaten on 54 overnight, was fluent throughout, playing eye-catching strokes through the off side and heaving Moeen Ali for a six over mid-wicket.
His sixth Test century and first outside Asia was greeted by emotional celebrations, dropping his bat and kissing his helmet in a gesture towards the Sri Lanka dressing room.
He received spirited support from Herath, who grew in confidence during his second Test half-century, particularly when sweeping and reverse-sweeping Moeen.
However, that England were forced to field for longer in Sri Lanka's second innings than they had in the rest of the series combined was also down to their own mistakes in the field.
On a dark morning ideal for bowling, Anderson already had Milinda Siriwardana held at gully when he got Chandimal to inside-edge through to wicketkeeper Jonny Bairstow, who put down a straightforward chance to reprieve the right-hander on 69.
And Herath was given a life on 47 when James Vince made the mess of a skier, back-pedalling towards the point boundary.
Indeed, Anderson aside, England were below their best with the ball, with Moeen and Steven Finn disappointing.
The hosts will have the opportunity to complete a series whitewash in the third and final Test at Lord's, which begins on 9 June.
England have named an unchanged squad for the Lord's Test.
Brief scores
England - 498/9 dec (Moeen 155*, Hales 83, Root 50, Pradeep 4-107) and 80/1 (47*)
Sri Lanka - 101 (Broad 4-40, Woakes 3-9, Anderson 3-36) and 475 (Chandimal 126, Mathews 80, Silva 60, Anderson 5-58)
Result - England won by 9 wickets