BALTIMORE -- Even with first baseman Chris Davis apparently on his way back from the disabled list any day for the Baltimore Orioles, Steve Pearce, his replacement, has made his case to remain in the lineup.
Baltimore (19-14) is five games over .500 for the first time this season. Meanwhile, the Astros have lost six of their past seven games.
Pearce, who re-signed with the Orioles just two days after being released April 27, hit his third homer in four games. He homered in consecutive games for the first time in his eight-year major league career and has three this season.
"I just want to keep doing what I'm doing," said Pearce, who is batting .300 (10-for-30) with three homers, six RBI and five runs since replacing Davis over the past nine games. "I think they know what I can do. Hopefully, I can stay around for a little longer this time."
Orioles starter Wei-Yin Chen (4-2) had another effective outing, allowing two runs and five hits with four strikeouts and one walk and he tied a season-high by going seven innings.
Machado hit his first home run of the season since returning from offseason knee surgery on May 1. Orioles outfielder Nick Markakis went 3 for 4 with an RBI and extended his hitting streak to 16 games.
"Someone announced he had a 16-game hitting streak," Orioles manager Buck Showalter said about Markakis. "I didn't know that. I bet he doesn't know, either. He's healthy. Strong. He worked real hard this offseason for the first time that he was able to in a long time."
Chris Carter hit his fifth home run of the season for the Astros.
Houston right-hander Scott Feldman made his first start since going on the disabled list April 21 with right biceps tendinitis and was facing his former team. Feldman, who went 5-6 as a starter for the Orioles last season, allowed two runs and five hits with six strikeouts over six innings. He gave up a home run for the first time in five starts this season.
"I definitely felt like I could throw all my pitches," Feldman said. "I was throwing more free and easy. It was a good feeling, in that regard. It would've been a nice one to win. They just got the best of us tonight."
With the game tied at 2, the Orioles' J.J. Hardy led off the seventh with a double to center. Astros righty Jerome Williams (1-2) got the next two batters to ground out before allowing an RBI single to Jonathan Schoop. Markakis followed with a double to center that made it 4-2.
"I thought I battled, getting those two ground balls, and then just left that cutter up over the middle," Willams said. "You've just got to tip your hat to them and try to execute the pitch next time."
Dexter Fowler led off the ninth with a double off Orioles closer Tommy Hunter. Marc Krauss walked before Hunter got Carter to hit into a double play, which scored a run. George Springer then struck out to end the game as Hunter picked up his 11th save.
Houston fell to 1-20 when scoring three or fewer runs.
The Astros opened a 1-0 lead in the second when Matt Dominguez led off with a double and later scored on a sacrifice fly by L.J. Hoes, who was acquired from Baltimore last season. The Orioles, who were coming off a three-game sweep of Tampa Bay, answered in the bottom half of the inning when Pearce and Machado hit solo shots.
Carter snapped a 1-for-16 skid when he led off the seventh with a liner to left off Chen that cleared the fence by several rows. The Orioles, however, would rally for the victory in the bottom half of the inning.
"In the top of the inning, I allowed a tying home run so I was kind of upset about that," Chen said. "But they had a timely offense and Nick and Schoop had big hits and we were able to get the go-ahead run and got the win. I was happy about that."