"Whether the score is 10-1 or 3-2, it always feels good to win," said manager Bo Porter, whose team won its first one-run game of the season.
Martinez clubbed a two-run homer in the second inning off former Astros starter Brett Myers, and Ankiel followed with a solo shot -- Houston's first back-to-back homers this year. Harrell threw 5 2/3 innings for his first win, while relievers Wesley Wright, Hector Ambriz and Jose Veras combined to allow three hits and strike out two, with Veras getting his first save.
"It was outstanding," Porter said. "Wesley gave us quality work against a lineup that had several switch-hitters and a bunchy of lefties, and he did a tremendous job of keeping the game right there. Ambriz came in and did a solid job, and Veras a tremendous job closing it out. Defensively, we had three big double plays and got out of some tough jams. I'm very proud of the guys tonight."
Myers (0-3) retired the first four batters he faced before Carlos Pena drew a one-out walk. Martinez went the other way with a 1-0 pitch and sent it over the right-field wall for a two-run homer. Ankiel followed with a homer on a 3-2 pitch -- his fourth of the year -- to put Houston ahead, 3-0.
"Home runs were the whole game for both teams tonight," said Ankiel, whose four homers have accounted for all but two of his hits this year. "I'm just thankful we were able to hold the lead. The bullpen came in and held the lead and Lucas did a great job. It was a great win for us."
Martinez's homer was his only at-bat of the game. He sprained his right knee during a check-swing in the fourth inning, falling to the ground before being helped off the field. He's listed as day to day, and said it could take a couple of days to come back.
"I was just bummed out more than anything that I couldn't finish the game," Martinez said. "I was feeling good and I knew it was going to be a good game."
Harrell (1-2) was frustrated with his performance. He gave up a two-out, two-run homer to Lonnie Chisenhall in the fourth inning and walked five batters for the second time in his last three starts, needing 98 pitches to get through 5 2/3 innings.
"I was struggling to throw strikes again," Harrell said. "That's kind of the trend right now. It's something I need to work on in between starts and definitely focus on that. If the defense wouldn't have played so well and we wouldn't have scored some runs early, it could have been a rough night."
Cleveland manager Terry Francona thought his batters made Harrell work hard for his outs.
"We drove his pitch count up," the skipper said. "When he had to make pitches, we hit some ground balls. We had some chances and he made some pitches."
Harrell was clearly frustrated when he left the mound, and Porter said that's to be expected from competitors like Harrell.
"Like I told him, some nights you're going to go out there and not have your 'A' stuff and those are the nights you have to dig deeper and keep making pitches," Porter said. "He got a big double-play ball to get himself out of a jam as well. At the point when I went to go get him, I felt like that was it, and I felt like I wanted to turn it over to the bullpen, and they responded and did a great job."
The double plays loomed large for the Astros, who got one to end the third, another after Harrell walked the first two batters in the fifth and one more in the third with Ambriz on the mound to end the eighth.
"They're going to be different break points in the game," Porter said. "When you win those break points, you put yourself in the best position to win the ballgame. We were able to do that tonight, and those guys continue to make pitches and quality pitches to get out of those tough jams. Defensively, we picked up the balls and made the plays when we needed to make them."