Sri Lanka, who had won the preceding Test series 2-0, made light work of an improved batting display by Pakistan in which teenager Umar Akmal led the way with 66 off 65 balls.
The 19-year-old, whose elder brother Kamran Akmal is the team's wicket-keeper, propelled Pakistan to the highest total ever at the Rangiri International Stadium.
But Jayawardene, opening the batting in place of the indisposed Sanath Jayasuriya, and Tharanga gave Sri Lanka the perfect start in good batting conditions.
Jayawardene hit 14 boundaries and a six in his 11th one-day century and his first since making 107 for Asia against Africa in the Afro-Asia Cup in Chennai in June 2007.
Left-handed Tharanga helped himself to nine fours, before both batsmen fell in successive overs.
Sri Lanka lost a third wicket i