KANSAS CITY, Mo. — It took five starts for five different teams over an eight-year span before Zack Greinke finally beat his old club, the Kansas City Royals.

Greinke (16-5), now with the Houston Astros, went six strong innings and rookie Yordan Alvarez belted a pinch-hit, three-run homer in a 6-1 victory on Saturday night. Alex Bregman hit his 36th homer and rookie Kyle Tucker was 4 for 4 for the AL West-leading Astros.

Greinke gave up one run, six hits and no walks while striking out seven. He handed a 2-1 lead to the bullpen and Hector Rondon, Joe Smith, Bryan Abreu and Will Harris tossed three scoreless innings.

This was the fifth start by Greinke against the Royals since they traded him after the 2010 season. Oddly, all five were at Kauffman Stadium and each was for a different team — the Brewers, Angels, Dodgers, Diamondbacks and Astros. He was 0-2 with two no-decisions in the first four starts.

“I guess it’s nice. I pitched a couple good games, a couple bad games. It just hadn’t happened,” Greinke said.

Until now.

It also gave him victories over all 30 major league teams in his career, becoming only the second active pitcher with that distinction, joining Max Scherzer.

After left-handed reliever Gabe Speier gave up Tucker’s fourth single and walked Robinson Chirinos in the eighth, Alvarez batted for Abraham Toro. Alvarez, a left-handed hitter, sent his 25th homer soaring over the center field wall.

“They told me earlier to get ready for any moment that I might be needed to hit,” Alvarez said, “and so I was ready.”

Tim Hill bailed out Royals starter Mike Montgomery (3-9) in the sixth inning after the Astros went ahead 2-1 on a walk and singles by Yuli Gurriel and Tucker. An error by second baseman Nicky Lopez loaded the bases with no outs. Hill got a strikeout, a popup and a flyout to strand all three runners.

“His last four or five times out have been spectacular,” Royals manager Ned Yost said.

Lopez ended a 0-for-22 skid with an infield single to start the third. Whit Merrifield followed with a drive that bounced off the left-field bullpen fence. Lopez, running from first, made a headlong dive for the plate past catcher Chirinos’ foot, but he was called out by plate umpire Chris Guccione. The Royals challenged the call and Lopez was ruled safe — not only did he touch the plate before the tag, but Chirinos illegally blocked home before catching the ball.

“I saw him in front of the plate and I tried to get around him and my hand hit him right in the foot, but I was able to get a couple of fingers in there,” Lopez said.

Bregman tied it by leading off the fourth inning with a homer to left field.

One night after left fielder Alex Gordon and Yost were ejected by plate umpire Lance Barrett for remarks about his ball-and-strike calls, Royals bench coach Dale Sveum was ejected by Guccione while the Astros were batting in the second inning.

Meantime, Greinke was dazzling the Royals with an assortment that included a very slow curveball.

“I’ve never seen one that slow and I don’t think he’s thrown that many that slow,” Astros manager A.J. Hinch said. “He threw a couple of good ones. It was a game plan that he was going to do against some of these guys who were a little jumpy at the plate. It was very, very effective.”

And it finally gave Greinke a victory as a visitor to a stadium where he’d won 36 times in his Royals tenure.

“I like the stadium. That’s more what it is than anything, I guess. It’s got a really good feel and I like playing here for that reason,” he said.