BALTIMORE -- The Rangers ended a 2-5 road trip Sunday with a 6-4 win over the Orioles that allowed two key players to put recent struggles behind them and provided some much-needed momentum heading into a seven-game homestand against Minnesota and Oakland that begins Monday night.

"There was definitely more energy in the dugout today," Josh Hamilton said. "It felt like everybody was ... into the game, so hopefully it carries over to home. We could have come off the road trip a lot worse than we did -- what did we lose, one game [in the standings]? But it could have been a lot worse. It was good we hung in there."

Hamilton and Vladimir Guerrero hit three-run homers, Tommy Hunter recorded his career-high 10th victory as the Rangers posted their second win in three games and earned a split of the four-game weekend series. Texas, which had lost five of six games, finished its season series with Baltimore with a 4-6 mark.

"These guys have been a thorn in our rear end pretty much the whole [year]. ... They always seem to get these clutch hits, and they got a couple today. Thankfully, Josh and Vlad are my teammates," Hunter said.

For Hunter, it was a nice rebound after not lasting past three innings in three of his past four outings. Although some players claim not to pay attention to such statistics, Hunter was well aware of where he stood after several subpar outings.

"Yeah," he said with a wry smile, "it's been awhile."

Hunter wasn't the only Rangers player who used the four-game series at Camden Yards to get back on track. Hamilton capped off a resurgent weekend after entering play Friday in a 1-for-16 slump in his previous five games. He went 7-for-14 with two homers and seven RBIs in the final three games of the four-game series at Camden Yards. Guerrero's fifth-inning shot was his 22nd of the year and his first since July 31 at Anaheim.

Hamilton used the weekend to reacquaint himself with his pregame ritual of playing home run derby during batting practice. The self-prescribed treatment worked, and he emerged from a mini-funk.

"It probably won't be the last time I get out of routine, because it's probably going to happen again at some point, but it's good to stick with it, and it's taught me a valuable lesson," Hamilton said.

Texas learned a lesson about sticking to its guns even when things aren't going well.

"We've got to keep playing," Rangers manager Ron Washington said. "We're not playing with a full boat. The guys that we've got out there, we've got to get them right and get them contributing. Any time you can get a win, it's good, especially this one, because we've got to fly. We can fly having fun, and it's nice to hear the music in the clubhouse. That's two in a row I thought we put together pretty good. It was just nice to win today."

Hunter finally notched his 10th victory on his third try. The righty worked eight innings, yielding three runs on five hits without a walk or a strikeout. He didn't have a three-ball count all afternoon.

"When you throw two-seamers, changeups, cutters and curveballs for strikes without problems, you're able to be efficient with your pitches and have a good outing," Hunter said. "We worked pretty hard in the bullpen ... and it paid off."

Washington said the Rangers hadn't lost confidence in Hunter, despite his recent struggles.

"We never doubted [Hunter]. He went out there today, and he had everything working. ... He got us through the eighth inning and gave us enough to win the ballgame," Washington said. "That's Tommy Hunter. He picked his spots, did what he wanted to do out there. They have a tough lineup up and down. He deserves a lot of credit for going to work the last five days and giving us exactly what we needed."

As much for Hunter's own sanity as anything.

"[Your confidence] is not going to be at the top, especially when three out of four, you only go three innings," he said. "But this clubhouse, this group of guys, they don't let you get down on yourself. There's no room for that. ... They get you right back in the swing of things."

Texas jumped all over ex-Rangers right-hander Kevin Millwood, who continued a disturbing trend by allowing two or more first-inning runs for the 12th time in his past 16 starts. Millwood (2-14) surrendered six runs on six hits over six innings, walking two and striking out two while dropping his sixth straight decision.

Seven pitches into the game, the Rangers had a 3-0 lead, courtesy of Hamilton's team-leading 28th homer of the season, his second in two games. Elvis Andrus led off with a single to extend his hitting streak to 12 games, Michael Young drew a four-pitch walk and Hamilton crushed Millwood's first pitch into the Orioles' bullpen in center field.

"Any time you score in the first inning and jump out to an early lead, it helps your confidence tremendously," said Hamilton, who had never faced Millwood before. "Especially against the Orioles, they've been doing a good job. Their pitchers have been stepping up and throwing good games against us, so to get those early runs really helped out."

Hunter retired the first nine hitters he faced before yielding a run in the fourth. After a leadoff double by Brian Roberts, Nick Markakis singled to center to make it 3-1.

Another first-pitch homer made it 6-1 in the fifth. Julio Borbon led off with a perfectly executed drag bunt to the first-base side of the mound for a single and went to second on Andrus' sacrifice. After Young flied out, Hamilton walked before Guerrero ripped Millwood's first offering into the first row of the left-field seats.

The home run gave Guerrero six homers and 20 RBIs in his career against Millwood -- that's tied for his most clouts off one pitcher and established a new mark for the most RBIs against a single hurler in Guerrero's career.

Luke Scott's two-run shot, his 100th career home run, got Baltimore within 6-3 in the sixth. Ty Wigginton singled with two outs, and Scott hit a moon shot to right-center off an 0-2 Hunter fastball. But that was the only mistake Hunter made in an otherwise stellar effort.

Scott said Hunter was effective at getting the Orioles to chase whatever he was throwing.

"He got everyone in swing mode. When a pitcher can throw strikes consistently and in swing mode, [he succeeds]," Scott said.

The Rangers called on Neftali Feliz to close the game, and he gave up a solo homer to Wigginton leading off the ninth, which prompted Washington to bounce out of the dugout and have a quick conversation to settle down Feliz.

"I told him, 'That's just one run. We've still got a two-run lead. Come on, now, go after these guys.' I just wanted to make sure that he got focused and knows that he can do the job," Washington said. "Just go on and take care of business, don't worry about what just happened."

Feliz listened to his manager's counsel, getting the next three hitters -- Scott, Corey Patterson and Felix Pie -- swinging at third strikes to nail down his 31st save.