Zack Greinke pitched eight sharp innings for his first win in almost a month and Billy Butler homered as the Kansas City Royals beat the Houston Astros 2-1 on Tuesday night.

The victory breaks a five-game losing streak for the Royals, who have won just seven of their last 23.

Greinke (9-3) allowed a run in the first before pitching seven shutout innings for his first win since throwing a complete game against Detroit on May 26.

He had two losses and a pair of no decisions in that span. The game was also his longest outing since the complete game.

The score was tied 1-all in the third inning before Butler's solo shot to the Crawford Boxes in left field put Kansas City ahead.

Greinke, who was facing the Astros for the first time, allowed three straight singles with two outs in the first, capped by Miguel Tejada's run-scoring hit that put Houston ahead 1-0.

He was replaced in the ninth by Joakim Soria who allowed singles by Tejada and Lance Berkman before striking out Ivan Rodriguez and Kaz Matsui, and ending the game with a groundout by Jason Michaels for his eighth save.

Greinke allowed eight hits, but didn't allow an extra-base hit and didn't give up more than one hit in any inning after the first.

Michael Bourn singled then advanced to second on a sacrifice before reaching third on a groundout by Hunter Pence in the eighth inning. But Greinke, who struck out five, was able to pitch out of trouble when Carlos Lee grounded out to end the inning.

Butler, whose go-ahead drive was his seventh homer of the year, added a double in the sixth inning.

Jose Guillen scored on a force out in the second inning to tie it at 1-all.

Astros starter Russ Ortiz (3-3) allowed five hits and two runs in seven innings for the loss. It was the longest outing of the season for Ortiz, who struck out four.

Alberto Arias walked one and struck out two in the eighth inning for Houston.

NOTES: Berkman was honored in a pregame ceremony commemorating his 300th career home run. Berkman reached the mark June 13 against Arizona. He did not start Tuesday and arrived late at the ballpark to spend extra time with his wife Cara, who gave birth to the couple's fourth daughter on Monday. ... Houston RHP Felipe Paulino threw a three-inning simulated game on Tuesday. Paulino, who has been on the disabled list with a strained right groin, could return as early as Saturday. ... Kansas City center fielder Coco Crisp will have season-ending shoulder surgery on Wednesday.