AL RECAP (NY YANKEES-BOSTON) BOSTON (Ticker) -- Orlando Hernandez, whose slump has coincided with that of his team, pitched eight strong innings and Bernie Williams drove in two runs as the New York Yankees avoided a three-game sweep with a 3-1 win over the Boston Red Sox. Hernandez (4-4) won for the first time since April 23, allowing one run and two hits while walking two, striking out six and lowering his ERA from 6.56 to 5.76. He was 0-3 in his previous four starts, yielding 21 runs and 27 hits over 20 innings. "I think the best thing tonight about him is he could put the ball where he wanted to," Boston designated hitter Reggie Jefferson said of Hernandez. "It wasn't that he was overpowering. If he wanted to put it on the inside corner, he was putting it right there; if he wanted to get his breaking ball backdoor, he could do it. If you do that, you're going to be tough. I don't know how in the world he had a 6 1/2 ERA." "(Hernandez) did a great job tonight, especially when he fell behind in the count, when he made the pitches he needed to make," added New York manager Joe Torre, who returned from prostate cancer surgery on Tuesday. "I think getting people out when you're behind in the count is a very good sign. Obviously, we've been struggling lately to score and we don't have (the offense) where we want it. But tonight we got a couple of runs early and `El Duque' took care of the rest." Williams had a sacrifice fly in the sixth inning and a solo homer in the eighth as the Yankees won for only the second time in nine games and moved within a half-game of the first-place Red Sox in the American League East. Mariano Rivera pitched a scoreless ninth for his 11th save in 12 chances. He retired Troy O'Leary on a flyout and struck out Reggie Jefferson to strand runners at first and second. Mark Portugal (3-2) allowed two runs and three hits in six innings but the Red Sox lost for the third time in 14 games. He walked three and struck out three. Portugal allowed just one hit when Tino Martinez walked to lead off the fifth. Martinez moved to third on consecutive groundouts and Chad Curtis came through with an RBI single between first and second base to give the Yankees a 1-0 lead. Chuck Knoblauch was hit by a pitch to start the sixth and Derek Jeter followed with a single to extend his hitting streak to 15 games. Knoblauch moved to third when Paul O'Neill grounded into a forceout and scored on Williams' sacrifice fly, doubling the Yankees' advantage. "This is a big win because it's the Red Sox," Jeter said. "We had lost the first two, it was almost like a must-win tonight. Nomar Garciaparra led off the seventh with a triple over Williams' head in center field and O'Leary drove him in with a sacrifice fly to make it 2-1. Hernandez retired Reggie Jefferson on a groundout and Damon Buford on a popout and struck out two in a perfect eighth inning. With one out in the eighth, Williams hit Rheal Cormier's 3-1 pitch over the center-field wall for his fifth homer. -=-=- 