NEW YORK -- Rangers starter Rich Harden was gone before four innings were completed on Sunday.

So, it seems, was the Rangers' offense.

By the fifth inning, a sellout crowd at Yankee Stadium seemed to sense a sweep was coming and Texas was helpless to stop it. That proved to be the case in the Rangers' 5-2 loss to the Yankees and veteran left-hander Andy Pettitte.

Harden took the loss after allowed four runs on five hits, six walks and two hit batters in 3 2/3 innings. The big hit was a bases-loaded broken-bat single by Yankees backup shortstop Ramiro Pena with two outs in the fourth.

"Too many pitches ... too many walks," Harden said. "You do that and the result is a broken-bat hit scores a couple of runs. You can't do that. It's unacceptable."

In getting swept by the Yankees, the Rangers have now lost four straight games.

"We got beat in all facets of the game," third baseman Michael Young said. "We have some adjustments we need to make. We've shown flashes of the team we're capable of being and we've also shown flashes that we have some things we need to work on.

"We're still very confident we'll get to where we need to be. But we need to make adjustments quickly. As team we have pride in the fact we're not going to make the same mistakes. ... We're going to get better quickly."

They need to get better if they want to compete on the Yankees' level. As Young admitted, the Rangers were just outclassed this weekend in all areas.

The Yankees' offense proved relentless while the Rangers' offense was mostly dormant. New York produced 17 runs on 27 hits, 13 walks and four hit batters; it hit four home runs.

Texas produced just six runs on 15 hits, six walks and one hit batter; it hit one home run. That was a three-run home run by Nelson Cruz in the eighth inning on Saturday, when the Yankees led, 7-0.

"A lot of it had to do with the pitchers we were facing," Rangers manager Ron Washington said.

That's true. CC Sabathia, A.J. Burnett and Andy Pettitte combined to allow just three runs in 21 innings. All three Rangers starters -- C.J. Wilson, Scott Feldman and Harden -- each gave up four runs in their outings.

Harden was done in by the Yankees' approach at the plate. They made him work, throw pitches and get deep into counts.

As Washington said of Harden, "Today he was just 3-and-2 on everybody. ... Today was just one of those days when we gave them too many baserunners."

The Yanks scored one in the first without a hit. Harden walked one, hit two and gave up a sacrifice fly to Robinson Cano. The Rangers scored two in the top of the third to take the lead, but missed out on a bigger chance as first baseman Mark Teixeira made a leaping catch on Josh Hamilton's line drive that took away at least an RBI double.

"Day games, there's a lot of white shirts, some glare, so every now and then, it moves in and out of the shadows," Teixeira said. "I lost it for a second, but luckily it found my glove."

Teixeira then tied the game in the bottom of the inning with his first home run of the year. Harden also walked Alex Rodriguez and a one-out single by Jorge Posada and walk to Curtis Granderson loaded the bases. Harden struck out Nick Swisher, but Pena -- playing because Derek Jeter had a head cold -- punched his broken-bat single just over first baseman Ryan Garko to score two runs.

Harden was gone after allowing a couple more walks and a single in the fourth. He threw 94 pitches while allowing 13 of 23 batters to reach first base. He is 0-1 with a 4.72 ERA in his first three starts, in which he walked 14 in 13 1/3 innings.

"My command can get better," Harden said. "Sometimes it's there and sometimes it's not. ... I'm not happy with it. I've got to pick it up. I've got to make some pitches and be more efficient."

Texas had four hits -- all were in the first three innings. An RBI double by Elvis Andrus and a run-scoring single by Michael Young with one out in the third gave the Rangers a 2-1 lead against Pettitte. But Young's hit was the club's last of the afternoon. Pettitte and Mariano Rivera combined to retire 20 of the final 22 Rangers hitters, allowing only a couple of walks.

"Pettitte's tough," Young said. "He's always tough. We got his pitch count up early, but he settled down and pounded the zone. But we've got to make sure if we're working a pitcher to stay with the plan and don't get off course. We can do a better job of being more disciplined at the plate."

The Rangers have much work to do.