HOUSTON -- Houston's Lucas Harrell struggled with his command on Friday night and was livid when he was pulled in the sixth inning.

His night ended up turning out all right though thanks to a strong performance by the Astros bullpen.

J.D. Martinez and Rick Ankiel hit back-to-back homers in the second inning and the Astros held on for a 3-2 win over the Cleveland Indians.

The win snaps a five-game skid for Houston and extends Cleveland's losing streak to five.

Harrell (1-2) allowed two runs in 5 2/3 innings before three relievers combined to shut Cleveland out the rest of the way.

Closer Jose Veras allowed one hit in the ninth for his first save in two tries.

"I was struggling to throw strikes again, it's just kind of been a trend right now," Harrell said. "It's something I need to work on between starts and definitely focus on that. If the defense wouldn't have played so well and if we wouldn't have scored some runs early, it could have been a rough night."

Carlos Pena walked with one out in the second inning before Martinez got Houston's first hit by launching a homer in the stands in right field off former Astro Brett Myers (0-3) to make it 2-0. Martinez left the game with a sprained knee in the fourth inning.

Ankiel followed with another homer to right field to push the lead to 3-0.

Lonnie Chisenhall closed the gap to 3-2 when he connected on a homer that sailed just inside the foul pole in right field in the fourth inning.

Myers, who was facing Houston for the first time since a trade last summer, allowed five hits and three runs with four strikeouts in five innings. He has given up an MLB-high 10 home runs with an 8.02 ERA in four games with three starts this season.

Harrell was chased by a single by Mark Reynolds with two outs in the sixth inning, and was none too happy about it. He stalked off the field before throwing his glove, hat and a cup of water when he reached the dugout.

He yielded five hits and two runs with five walks and four strikeouts.

Wesley Wright and Hector Ambriz combined to allow two hits in 2 1/3 innings before Veras came on for the save.

"I stress this all the time: there are going to be different break points in the game, and when you win those break points you put yourself in the best position to win the ball game," Houston manager Bo Porter said. "And we were able to do that tonight, and those guys continued to make pitches and made quality pitches to get out of those tough jams."

The Indians couldn't string together any hits late in the game as they fell to 0-10 this season when trailing after six innings. Jason Kipnis singled with two outs in the seventh inning before Asdrubal Cabrera struck out swinging to end the inning. The frustration for Cabrera, who is hitting .138, was evident after the strikeout when he angrily threw his bat.

Nick Swisher doubled to start the eighth before Carlos Santana drew a one-out walk. But Reynolds grounded into a double play to end the threat.

The Indians haven't been able to generate much offense this season and have been held to three runs or less in five straight games and 10 of 15 overall.

"We did have opportunities," Indians manager Terry Francona said. "I think what happens sometimes is, guys try too hard. We had a couple of chances, and we rolled over. We had opportunities to win that game because of our pitching."

Martinez left the game in the fourth inning after spraining his right knee while batting. Martinez was injured on a check swing. His knee buckled and he fell to the ground in pain.

He remained on the ground for a couple of minutes while Astros trainers attended to him. He was then helped to his feet and hobbled with assistance back to the dugout. He was replaced by Brandon Barnes and is listed as day to day.

He said after the game that he was "achy and sore" but that he should be OK.

"I was just bummed out more that I couldn't finish the game really," Martinez said. "I was feeling good and I knew it was going to be a good game."

Copyright 2013 Associated Press. All Rights Reserved.