NEW YORK, N.Y. - Even before meeting up with Josh Hamilton, the Texas Rangers are streaking.

Adam Rosales hit a two-run homer off Chris Capuano that bounced off the top of the left-field wall, Yovani Gallardo won for the second time since mid-April and the Rangers beat the New York Yankees 5-2 Sunday night for their fifth consecutive win.

"To come in and sweep a good team like this, especially here, is very difficult," Prince Fielder said. "We're playing solid baseball. Our pitching was great, and we were able to capitalize on some early mistakes."

Fielder had three hits and two RBIs for the Rangers, who swept the Yankees in New York for the first time since May 2003 at the old ballpark across the street.

Texas then headed to Cleveland, where Hamilton is to start in left on Monday night. The 2010 AL MVP, who has seen sidetracked by drug and alcohol problems plus shoulder surgery, was acquired from the Angels on April 27 and will be making his first appearance for the Rangers since 2012.

Manager Jeff Banister said the Rangers are playing with "a mess of confidence."

"To sweep these guys is an incredible feat for these guys," he said. "To spread the offence around like that tonight was nice."

New York held a pregame ceremony to retire Bernie Williams' No. 51 and unveil a plaque in his honour in Monument Park. Fielder remembered back to the 1996 World Series, when he watched his dad, Cecil, play for the Yankees.

"You can tell your kids, and your family and future people that you were here for this," Prince Fielder said. "Personally, I don't get to see that a lot but for the Yankees it's routine, or it seems it."

New York has lost six straight in a single season for the first time since May 11-16, 2011, and has 10 defeats in an 11-game span for the first time since May 23 to June 3, 1995, according to STATS.

Gallardo (4-6) allowed Brian McCann's two-run single in the first, and then pitched shutout ball through the sixth and wound up giving up four hits with six strikeouts and one walk. He had been 1-5 since winning at Seattle on April 17.

"I think that first inning, I was leaving the ball up in the zone," he said.

Sam Freeman retired McCann on an inning-ending flyout with two on in the eighth, and Shawn Tolleson struck out the side in the ninth for his third save.

Capuano (0-2), making his second start since recovering from a strained quadriceps, allowed three runs — two earned — and eight hits in 4 1/3 innings, lowering his ERA to 7.36.

Fielder hit an RBI double in the first after second baseman Jose Pirela allowed Shin-Soo Choo's grounder to bounce off his glove for an error, but McCann gave the Yankees a 2-1 lead in the bottom half after shortstop Elvis Andrus allowed Brett Gardner's leadoff grounder to bounce past him for his 10th error.

Rosales, the Rangers' No. 9 batter, put Texas back ahead in the second with a 379-foot drive just over the glove of a leaping Gardner in left. The Rangers boosted their lead in the seventh against Justin Wilson after Delino DeShields tripled over centre fielder Chris Young, who did not take the most direct route. Choo hit an RBI double and scored on Fielder's single high off the right-field wall.

"To be able to come and play the way we have this road trip, I think, it shows the kind of talent in this clubhouse," Gallardo said.

TRAINER'S ROOM

Rangers: LHP Derek Holland, who hasn't pitched since his season debut April 10 because of a strained muscle in the back on his left shoulder, could start a throwing program at the end of this week.

UP NEXT

Rangers: RHP Phil Klein (1-0) starts against the Indians, who open with Shaun Marcum (1-0).