Troy Taormina-USA TODAY Sports

Yordan Alvarez clubbed a walk-off home run with two outs in the ninth inning as the Houston Astros capped a five-run rally by defeating the visiting Kansas City Royals 7-6 on Monday.

Alvarez drilled a 3-1 slider from Royals closer Scott Barlow (2-2) to right-center field for his 24th home run. It marked the second consecutive walk-off win for Houston, winners of 12 of 14.

Handcuffed by Royals right-hander Jonathan Heasley, who allowed two runs (one earned) on three hits and two walks with three strikeouts over six solid innings, the Astros rallied for three runs in the eighth off a pair of Kansas City relievers. Right-hander Wyatt Mills departed after issuing a leadoff walk to Astros shortstop Jeremy Pena, giving way to left-hander Amir Garrett.

Garrett failed to record an out, issuing back-to-back walks before Kyle Tucker lined a two-run single to center that scored Pena and Alvarez and sliced the deficit to 6-5. Astros first baseman Yuli Gurriel then greeted Royals reliever Taylor Clarke with a game-tying RBI single.

The Astros' rally negated a multi-homer game for Royals catcher MJ Melendez, whose second homer of the game and eighth this season gave Kansas City a 6-3 lead in the top of the eighth.

Astros right-hander Jake Odorizzi endured a rocky return to the rotation following a 42-game absence tied to a lower left leg tendon strain. Odorizzi had pitched splendidly over his prior four starts prior to sustaining the injury at Boston on May 16, going 3-0 with a 0.79 ERA.

He found trouble almost immediately against the Royals, surrendering consecutive singles to Bobby Witt Jr. and Vinnie Pasquantino after issuing a one-out walk to Andrew Benintendi. Hunter Dozier followed with a two-run single the opposite way to right for a 2-0 advantage.

The second inning nearly mirrored the 36-pitch first for Odorizzi, who surrendered a leadoff infield single to Michael A. Taylor two batters before Whit Merrifield delivered a double that advanced Taylor to third. Benintendi added a two-run single that doubled the Royals lead to 4-0.

Odorizzi completed four laborious innings but not until he surrendered the first Melendez homer in the third and consecutive one-out singles in the fourth. He threw 90 pitches, 58 for strikes, while allowing a season-high five earned runs on a season-high nine hits plus one walk with three strikeouts.

More must-reads:

TODAY'S BEST
Snoop Dogg to be title sponsor of college football bowl game
Phillies remain MLB's hottest team with dominant Zack Wheeler performance
Spurs' Victor Wembanyama unanimously wins NBA Rookie of the Year award
A's place struggling starter on injured list
Longtime Saints OL, three-time Pro Bowler agrees to deal with AFC West team
Report: 10-time All-Star 'wants to re-sign' with Clippers
Kendrick Perkins 'wishes' LeBron James would make drastic career decision
Heat president Pat Riley calls out Jimmy Butler twice following playoff exit
Snoop Dogg makes big college football announcement
Pat Riley calls out Jimmy Butler over recent comments
How Tom Brady's investment in English soccer team cratered
Insider speculates Titans 'planning to move on' from former first-round WR
Panthers add former first-round pick to crowded RB room
Jets coach Rick Bowness announces retirement after long career
Mavericks sign Jason Kidd to multi-year extension
Reporter provides clarity on controversial NASCAR finish at Kansas
Stunning stat highlights NBA's youth movement
Report: Rival teams expect Sixers to attempt reunion with star
Donovan Mitchell channeled 'The Answer' in first-round win vs. Magic
Defending champion Golden Knights ousted by Stars in first round