Updated

BOSTON (Reuters) - The New York Yankees enjoyed a rare success over bitter rivals the Boston Red Sox on Tuesday, the 5-2 victory in a hot-tempered affair enabling the visitors to tighten the battle for supremacy in the American League East.

Emotions ran high with both benches clearing in the seventh inning when Boston starter John Lackey hit New York batter Francisco Cervelli before Yankees manager Joe Girardi was ejected for arguing a call in the ninth.

Cervelli had begun to move toward Lackey on the mound after being struck, but the matter settled without incident after both teams exchanged words.

"It looked a little weird, but I think it's part of the game," Cervelli told reporters. "I've got so much adrenaline, and I maybe need to control it a little bit, but I don't try to do anything bad.

On the mound, New York ace CC Sabathia remained cool with 10 strikeouts in six innings to notch his first win over the Red Sox this season and pull the Yankees (81-52) within a half-game of first-place Boston (82-52) in the division.

It was far from smooth sailing, however, as Sabathia (18-7)allowed 10 hits and dodged a Red Sox offense that stranded 16 runners on base.

In the end, the big left-hander helped the Yankees reverse their recent fortunes against a team that had entered the game with a 10-2 record over the Bronx Bombers this campaign.

"It's a big win against a team that we're chasing," Sabathia said. "I've been struggling a little. I felt I had good stuff."

Eric Chavez had RBI singles in the second inning and fourth to give New York an early 3-0 lead, but the Red Sox responded with two scores in the bottom of the fourth.

Cervelli hit a solo homer for the visitors in the fifth and the Yankees bullpen carried the team home.

Reliever Boone Logan got the final two outs of the seventh with the bases loaded, and Mariano Rivera came on in the ninth to lock down his 35th save of the year.

Carl Crawford hit a home run as the Red Sox racked up 13 hits but went just 2-for-13 with runners in scoring position.

Lackey allowed all five runs in seven innings to fall to 12-10 on the year.

(Writing by Jahmal Corner in Los Angeles; Editing by Ian Ransom)