BALTIMORE (AP) Wei-Yin Chen did just about everything right except put an end to the Texas Rangers' long-ball barrage.
Although the Rangers hit two more home runs - giving them 10 in three games - Chen and the Baltimore Orioles had enough weapons to offset the damage.
J.J. Hardy hit a tiebreaking two-run homer in the seventh inning to back an effective pitching performance by Chen and carry Baltimore to a 4-2 victory Wednesday night.
Jimmy Paredes homered and had two RBIs for the Orioles, who yielded four home runs in losing each of the first two games of the series.
In this one, the Rangers got solo shots from Shin-Soo Choo and Ryan Rua, but that was the extent of their offensive output.
''In my last start I allowed four home runs, but fortunately all four were solo shots,'' Chen said through an interpreter. ''The Rangers are a great team; all I can try to do is keep them from hitting home runs. Unfortunately I didn't do that today, but those were two solo shots.''
Chen (4-4) allowed two runs, four hits and a walk over eight innings to win his third straight decision. The Taiwanese left-hander is 5-0 with a 1.80 ERA lifetime against the Rangers.
''Chen with the fastball and changeup was really tough on our guys,'' Texas manager Jeff Banister said. ''We did clip him for a couple home runs, but it wasn't enough.''
Zach Britton struck out the side in the ninth for his 23rd save.
Nick Martinez (5-5) gave up four runs, three earned, and seven hits in 6 2/3 innings. He has lost three straight starts.
''I think it was a really good step in the right direction,'' the right-hander said. ''Even though it didn't turn out my way, I feel good.''
With the score tied at 2, Chris Davis led off the Baltimore seventh with a single and with one out Hardy hit a 1-1 pitch into the seats in left field.
''I just felt like I saw it pretty well out of his hand,'' Hardy said. ''I was able to put a good swing on it.''
Although Baltimore leadoff hitter Manny Machado went 0 for 4 to end his 12-game hitting streak, he contributed in the field with several exceptional plays at third base. In the seventh, he dived to his left to snare a grounder by Choo, made the throw while on his back and got the runner by a step.
''He does things every night that amaze me,'' said Hardy, the Orioles' shortstop and quite a fine fielder himself.
Choo put the Rangers up 1-0 in the third inning by homering in a third straight game. He pulled off that feat once before - in April 2013 with Cincinnati. He is the first Texas player to do it since Adrian Beltre in September 2012.
''I've got a little bit of confidence,'' Choo said.
Rau made it 2-0 with a drive to right in the fourth.
Paredes countered with his 10th homer in the Baltimore half. A double by Ryan Flaherty, an error by Beltre at third base and a run-scoring grounder by Paredes tied it in the sixth.
Rangers outfielder Josh Hamilton was given the night off after returning from a hamstring strain Tuesday and playing in his first game since May 31.
''We had scheduled that this was going to be a down day for him,'' Banister said, adding that the plan is for Hamilton to return to the starting lineup in the series finale Thursday night.
OF Delmon Young was designated for assignment by the Orioles, who needed the roster spot to fortify their 6-man bullpen. RHP Tyler Wilson was recalled from Triple-A Norfolk. ''We've got good quality people and you reach a point where you can't keep them all,'' manager Buck Showalter said.
Rangers: OF Delino DeShields (hamstring) played in the field at Triple-A Round Rock for the first time on Tuesday. ... Leadoff hitter Rougned Odor did not play after undergoing a dental procedure.
Orioles: 2B Jonathan Schoop (left knee) will continue his rehab assignment with Class A Frederick. He could join the Orioles on Sunday, when OF Nolan Reimold is expected to go on paternity leave.
Rangers: RHP Yovani Gallardo (7-6, 2.72 ERA) brings a scoreless streak of 23 1/3 innings into Thursday night's game. He was 2-0 with a 0.54 ERA in June.
Orioles: Kevin Gausman (1-0, 4.24) will be recalled from Norfolk for his second start of the season.