Troy Taormina-USA TODAY Sports

Cole Ragans produced his seventh quality start since being acquired by the Kansas City Royals, who rode an ambush first inning into a 7-5 win over the host Houston Astros on Friday.

The Royals (52-102) earned their third victory in four games against the spiraling Astros, who fell behind the Texas Rangers and out of first place in the American League West with their seventh loss in 10 games. Houston (85-69) occupies the third AL wild card spot, one-half game ahead of the Seattle Mariners, who lost 8-5 to Texas.

Ragans (7-4) held a four-run lead before he took the mound in the bottom of the first. He allowed one run when Yordan Alvarez smoked a one-out double to left-center field that scored Jeremy Pena from first. The Astros halved the deficit an inning later by getting a leadoff, opposite-field home run to Jose Abreu.

But Ragans, acquired from Texas on June 30, thwarted the Astros repeatedly over his final four innings of work. He retired the side in order in the third and fifth innings and worked around a leadoff triple by Kyle Tucker in the fourth by sandwiching two groundouts around his strikeout of Mauricio Dubon.

When Alvarez and Alex Bregman walked in succession to open the sixth, Ragans buckled down again and recorded three consecutive outs to stymie the Astros once more. Ragans allowed two runs on three hits and four walks with five strikeouts over six innings by limiting the Astros to an 0-for-8 showing with runners in scoring position.

Astros left-hander Framber Valdez (12-11) wasn't as resourceful. The first five batters reached against Valdez in the first, starting with a passed ball by catcher Martin Maldonado that allowed Maikel Garcia to reach despite striking out. Bobby Witt Jr. followed with an RBI triple before MJ Melendez added a run-scoring single. Edward Olivares (RBI double) and Nick Loftin (sacrifice fly) extended the rally to four runs.

Valdez found his stride over the ensuing four frames but opened the sixth with consecutive hit batsmen. One batter after Nick Pratto extended the Royals' lead to 5-2, Kyle Isbel knocked out Valdez with a bloop two-run single to center.

Houston fashioned a rally in the eighth courtesy of a three-run home run by Chas McCormick off Jackson Kowar, but James McArthur stranded runners at the corners in that frame before silencing the Astros with a perfect ninth for his second save.

More must-reads:

TODAY'S BEST
Two-time Super Bowl champ signs with AFC contender
Stars center matches Gretzky feat as Dallas pushes Avalanche to brink
Gritty young Thunder take down veteran Mavericks in Game 4
Cubs acquiring veteran reliever from Mariners
Top-five NBA Draft prospect suffers scary non-contact injury
Hurricanes stay alive with third-period outburst vs. Rangers
Jaylen Brown's big three-pointer gives Celtics 3-1 lead over Cavs
Avalanche star placed in player assistance program
Mercury announce devastating injury on eve of WNBA season
Randy Moss' son makes major football announcement
Reds place key outfielder on injured list with broken thumb
Tom Brady's broadcasting debut set for Week 1 of NFL season
Struggling Cubs reliever placed on injured list 
Report: Justin Fields had ‘toxic' relationship with ex-Bears QB
Extension makes Lions QB Jared Goff one of NFL's highest-paid players
Kentucky's Reed Sheppard displays excellent skills at NBA Draft Combine
Knicks big man undergoes another ankle surgery
Flames CEO stepping down, transitioning to advisory role
Oilers star seemingly dismisses Arturs Silovs' performance in Game 3
Bengals QB Joe Burrow is making a notable change to stay healthy in 2024