BALTIMORE -- At the end, almost four hours after it had begun, the Rangers were barely hanging on to their once-commanding lead and their once-bright hopes of a winning road trip.

Their pitchers had thrown 164 pitches and they had four front-line starters -- including three All-Stars -- sitting on the bench for various physical reasons. The Orioles were one swing of the bat away from erasing a six-run deficit and the guy at the plate had already gone deep once on a warm and sticky Sunday afternoon. The pitcher on the mound had also already given up two home runs in the inning.

But C.J. Wilson prevailed by striking out Brian Roberts to end the game and the Rangers were able to emerge from a grueling three-hour, 48-minute contest with an 11-10 victory over the Orioles on a typically humid Baltimore afternoon at Camden Yards.

The victory allowed the Rangers to take two of three from the Orioles and finish 4-2 on their road trip to Baltimore and New York. They return home to open a four-game series with the Angels on Monday at Rangers Ballpark in Arlington.

The Rangers started the game without shortstop Michael Young and catcher Jarrod Saltalamacchia, who were nursing minor groin injuries. Milton Bradley left the game after three at-bats with tendinitis in his left knee and Josh Hamilton was given the final two innings off in the hopes of giving him a breather. The Rangers were up 11-5 at the time, but they still had to sweat it out to the very end.

"It was grueling, but when you play 162 games, you're going to get one of those games where you just have to hang on no matter how many runs you score," Rangers manager Ron Washington said. "Today was one of those days. I'm quite sure over in the other clubhouse they wish they were the ones who held on so I'm very happy we held on. We got the win."

The Rangers led, 11-5, going into the bottom of the eighth before the Orioles pulled within one run. Nick Markakis hit a three-run home run off Josh Rupe in the eighth and Kevin Millar and Melvin Mora hit home runs off Wilson in the ninth.

"I thought we were going to get one today," Orioles manager Dave Trembley said. "We kept coming back and coming back."

The Orioles hit four home runs, including one by Roberts that gave them a 3-2 lead off Rangers starter Kevin Millwood in the third. The Rangers hit just one home run, but it was a big one.

The Rangers tied the game in the fifth against Orioles starter Radhames Liz on a double by German Duran and a single by Ramon Vazquez, then had two on and two out later in the inning with David Murphy at the plate.

Murphy entered the game hitting .179 (14-for-78) in his last 22 games and hadn't hit a home run since June 11. He had also struck out and popped out in his first two at-bats, both coming with the bases loaded. But this time, he smacked a 1-0 pitch over the right-field wall for a three-run home run that gave the Rangers a 6-3 lead.

"I was hoping to do some damage there," Murphy said. "I've been struggling, but we've been winning, so I've been trying to put that in front and my own struggles in the back. But to get a win today and play a significant role feels great."

Millwood was also able to get a victory despite allowing five runs on nine hits in five innings. Only three were earned as his fifth-inning throwing error kept the Rangers from turning an inning-ending double play that would have kept two runs from scoring. By that time, Millwood seemed to be laboring in the heat. He left after five innings with a 6-5 lead.

"It was humid and hot, but the biggest problem today was getting the leadoff hitter," Millwood said. "If I could have been a little more efficient with that, it could have turned out differently."

Millwood, who has won six straight over the Orioles, and four relievers ended up allowing 15 hits, but they walked only two batters. The hurlers also held Baltimore to 2-for-19 with runners in scoring position. Orioles pitchers walked 10, including three in the eighth inning when the Rangers scored five runs to take an 11-5 lead. Texas was 5-for-14 with runners in scoring position.

Ian Kinsler finished with three hits to extend his hitting streak to 18 games. Murphy and Vazquez also finished with three-hit games and Duran was 2-for-4 with two RBIs.

"It was a tough one," Kinsler said. "But it's nice to have a tough game with the sun beating down on you for five hours and ending up winning. We've had a couple like that come out on the losing end. It was exhausting, but we got the win and had a huge road trip. We all feel good about the road trip and now we have a big series against L.A. It should be exciting."