NEW YORK (AP) — Andrew Benintendi hit a tiebreaking, two-run homer in the seventh inning and the New York Yankees got a win they desperately needed, beating the Toronto Blue Jays 4-2 Sunday to avoid a four-game sweep.

On the day Yankees general manager Brian Cashman was booed while the team retired the No. 21 of former star Paul O’Neill, the AL East leaders won for just the 10th time in 30 games since the All-Star break. They top the division by eight games over Toronto.

After New York’s frustrations reached the point of ace Gerrit Cole punching the dugout roof twice and manager Aaron Boone pounding his hand on the podium during a postgame news conference Saturday, the Yankees’ only qualms were with Toronto starter Alek Manoah.

In the fifth, Manoah plunked major league home run leader Aaron Judge in the left elbow with a sinker. Judge glanced at Manoah as Cole started yelling and a few other Yankees came over the dugout railing.

Cole was intercepted by bench coach Carlos Mendoza before reaching the umpires. During the commotion, Judge and Manoah, who were teammates in the All-Star Game last month, appeared to diplomatically discuss the pitch.

The Yankees came back quickly after Wandy Peralta walked ninth-place hitter Jackie Bradley Jr. to force in the tying run in the top of the seventh.

Jose Trevino beat third baseman Matt Chapman’s off-balance throw for an infield hit and was sacrificed to second. Benintendi hit a long foul ball, then sent a slider from Adam Cimber (9-5) into the second deck in right field.

Benintendi, who also doubled, hit his fourth homer of the season. It was his first home run since June 20, more than a month before Kansas City traded him to New York.

Anthony Rizzo scored on a throwing error by Toronto left fielder Lourdes Gurriel Jr in the first. and DJ LeMahieu hit a go-ahead RBI single in the fourth.

Whit Merrifield hit a bizarre home run in the Toronto fourth on a ball that twice bounced on the fence before going over. The Blue Jays had won four in a row.

Lou Trivino (2-7) got the final seven outs.

New York starter Nestor Cortes allowed one run and three hits in six innings. He struck out five.

Manoah allowed two runs, one of them earned, and four hits in six innings.

TRAINER’S ROOM

Blue Jays: OF/DH George Springer didn’t start for the third straight game after fouling a ball off his knee while going 5 for 5 in Thursday. He singled as a pinch-hitter in the seventh… LHP Tim Mayza (dislocated right shoulder) threw 10 pitches in his first rehab appearance for Triple-A Buffalo Friday.

Yankees: OF/DH Giancarlo Stanton (left Achilles tendinitis) went 0 for 3 as the DH in his first rehab game for Double-A Somerset on Saturday night and was expected to get three to five at-bats Sunday. Stanton will work out Monday afternoon in New York and face RHP Luis Severino (right lat strain) in live batting practice Tuesday but is unlikely to play in the Subway Series. … RHP Clay Holmes (back) threw 10 pitches in a bullpen session, a day after playing catch for the first time since going on the IL Wednesday. … LHP Zack Britton (left elbow) threw 18 pitches in a bullpen session Saturday at the team’s spring training complex in Florida. … RHP Albert Abreu (right elbow inflammation) was placed on the IL and RHP Luke Bard had his contract purchased from Triple-A Scranton/Wilkes-Barre.

UP NEXT

Blue Jays: open a three-game series in Boston Tuesday.

Yankees: RHP Domingo Germán (1-2, 4.45) opens the Subway Series against Mets RHP Max Scherzer (9-2, 2.15), who is going for his 200th career win.

___

More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP_Sports