TORONTO -- Alfonso Soriano liked the first two pitches he saw from left-hander J.A. Happ on Tuesday night.
He hit both of them for home runs, the 399th and 400th of his career.
Soriano's four RBIs were more than enough for left-hander Andy Pettitte as the New York Yankees defeated the Toronto Blue Jays 7-1.
Soriano said he was glad "just to get (No. 400) out of the way."
"I want to have time to think about it when I'm retired," he said. "Very proud. I never thought I was going to hit 400 homers in the big leagues."
Happ said, "Soriano got me on a first pitch and it's tough when you get behind against a pitcher like that. He did his job and I didn't do mine."
Brett Gardner and Alex Rodriguez also hit home runs for the Yankees.
Pettitte (10-9) held the Blue Jays to five hits and no runs in seven innings to pick up his third consecutive win.
Soriano keyed a four-run first inning with a three-run homer against Happ (3-4) after Yankee second baseman Robinson Cano was hit by a pitch on the left hand.
Cano has a bruised hand and did not come out for the bottom of the first. X-rays were negative.
"Extremely relieved," Yankees manager Joe Girardi said. "The fact that there's no break is a good sign. We haven't had a lot of luck on our side when it comes to X-rays. We got some tonight."
Happ allowed seven hits and five runs in 4 2/3 innings before being replaced by right-hander Esmil Rogers, who allowed Gardner's ninth homer of the season and Rodriguez's fourth of the season and the 651st of his career.
Happ had a cramp warming up in the bullpen and after he hit Cano with the pitch, manager John Gibbons visited him with a trainer at the mound.
"Warming up in the bullpen, he came down with a cramp in his side," Gibbons said. "We were a little concerned about that. He was just off with his location. He threw a couple of balls way out of the zone and that's what got our attention about his side maybe bothering him. Then he settled in and he hung in there."
Happ said, "I was just feeling a little bit tight and I tried to get loose. It's a situation where I don't want to make a too big deal about that. There's no excuses for any of it. I just tried to get loose and it did go away."
Right-hander Adam Warren took over for the Yankees in the eighth and allowed four hits, including a run-scoring double by Kevin Pillar.
Moises Sierra had two singles and a double for the Blue Jays.
Eduardo Nunez, who replaced Cano at second base, left the game in the ninth with a knee injury and was replaced by Mark Reynolds, who moved from first base. Lyle Overbay took over at first.
"He just kind of tweaked his knee," Girardi said. "The doctor checked him out and he's fine."
The Yankees are 13-2 against the Blue Jays this season.
The teams play the rubber match of the three-game series on Wednesday at Rogers Centre.
Gardner led off the first with a double and Derek Jeter singled to score the first run. Cano was in pain after being hit by Happ's pitch but stayed in the game and scored on Soriano's home run game on the first pitch.
"It was good that we jumped on (Happ) right away," Girardi said. "It gave Andy something to work with and I thought that was important."
Gibbons said, "The big play there is the first pitch to Soriano and he takes him deep. When you spot them four runs out of the gate, it's hard to overcome that. Especially when we're not scoring a lot of runs right now, it makes it tough. We just couldn't get anything going, we hit into four double plays."
Nunez took over for Cano at second base in the bottom of the first.
Soriano hit his second homer of the game on the first pitch of the third inning. The ball bounced off the top of the left-field fence and over. It was his 11th homer this season as a Yankee and his 28th on the year overall. He was acquired in a trade with the Chicago Cubs on July 26.
"He's been great for us," Girardi said. "He's a big reason we've scored a lot more runs and won a lot more games."
Pettitte said, "It was a great pickup for us. It's energizing when you have a special player like that come and be able to hit for that kind of power and be able to get out there and run around the bases and stuff like that. It's exciting."
NOTES: Blue Jays general manager Alex Anthopoulos said before the game that John Gibbons would return as manager next season despite the team's disappointing record. ... Blue Jays RHP Chien-Ming Wang has been assigned outright to Triple-A Buffalo after being designated for assignment o Monday. ... The Yankees entered Tuesday's game having won 23 games by one run, exceeding their total of 22 one-run wins in 2012. ... The series ends Wednesday with Yankees RHP Hiroki Kuroda (11-9, 2.71 ERA) facing Blue Jays RHP Todd Redmond (1-2, 4.44 ERA).