Vettori broke the stand when he castled Jayawardene and the task was quite enormous for Sri Lankan lower order to score the required runs.
Earlier, Ryder battled through a groin strain for his 74 and combined for a 125-run opening stand in 20 overs with fellow opener Brendon McCullum (46).
However, the Black caps lost half their side by the 30th but Guptill and Vettori (48) played saviours with their valiant efforts down the order.
Ryder batted with a runner after picking up a groin strain in the fifth over and though the burly left-hander was in discomfort, he didn't let it hamper his fluent stroke-play.
Image: Kyle Mills of New Zealand in action during the ICC Champions Trophy.
Full Coverage: Champions Trophy 2009