Hideki Matsui hit a solo shot to highlight a two-run ninth inning as the New York Yankees rallied for four runs in the 12th en route to a 6-5 victory over the San Diego Padres on Sunday.

After singling in the seventh for his first hit in three games, Matsui and pinch hitter Kenny Lofton connected for back-to-back homers off Trevor Hoffman to tie the game at 5-all, only to have San Diego lead 5-2 in the top of the 12th on three hits, a sacrifice fly and a walk.

In the bottom half, Matsui was intentionally walked to load the bases and Ruben Sierra hit a sacrifice fly for the "sayonara" winner to score Jason Giambi, who ignited the decisive frame with a two-run single.