KANSAS CITY, Mo. — Jack Flaherty got a lift from St. Louis' lineup, and the rookie right-hander made the most of it.

Flaherty struck out nine in seven innings, and the Cardinals beat the Kansas City Royals 8-3 on Saturday night for their fourth straight win.

Harrison Bader and Jose Martinez each hit a two-run homer, helping the Cardinals move seven games above .500 for the first time since June 12. They are 15-9 since Mike Shildt was named interim manager on July 15.

"It's a lot easier when the offense goes out and gets you four runs, gets you ahead like that," Flaherty said. "And then, you give up two and they get two right back. You look up and you've got a four-run lead again. Offense did their thing tonight."

Bader drove a full-count pitch over the wall in left with Jedd Gyorko aboard in the sixth. Danny Duffy (7-11) came close to striking out Bader earlier in the bat, but first base umpire Adam Hamari ruled Bader did not go around on a check swing.

When manager Ned Yost came out to remove Duffy after the homer, the pitcher headed for Hamari instead of the dugout. Pitching coach Cal Eldred had to restrain Duffy, who was ejected by Hamari.

"He missed that call," Duffy said. "It was so blatant that he went. I was upset with the missed call and I let it out. I didn't think it was enough to walk toward me, to instigate it, which he did, baited me for sure. It's not what lost us the game. It certainly isn't. I didn't pitch a good game."

Bader had a different view, saying "a hundred percent" he checked his swing.

"He made the right call," Bader said.

Bader said he was "just reacting" on his homer.

"Loading up early to make sure that I could hit everything, because he has a big arsenal," Bader said. "With two strikes he expands a lot, so I was just loading up early and he left something up and I just put a good swing on it."

Duffy indicated his arm is not feeling the best.

"I looked up when I was rarin' back for a normal 95-96 (mph fastball) and I saw 87 up there," Duffy said. "I don't think it's a mystery that I don't feel great, but I'm not going to run from it. I'm used to throwing in the mid-90s and I'm not. I'm not a doctor. I can't diagnose what's going on, but whatever it is we'll get through it and I'll be fine."

Flaherty (6-6) was charged with two runs and three hits. Martinez connected in the ninth and drove in three runs.

The Cardinals (62-55) scored four runs after Duffy retired the first two batters in the third.

Yadier Molina sparked the rally by finishing a 10-pitch at-bat with a double. Molina advanced to third on a wild pitch and scored on Martinez's infield single.

Marcell Ozuna tripled home Martinez and scored on Paul DeJong's double. Jedd Gyorko's RBI single, St. Louis' fifth straight hit, made it 4-0.

"Danny was really rolling the first two innings," Yost said. "Until the Yadier at-bat, he was doing a great job of managing his pitch count. Yadier started that long inning for him."

Alcides Escobar hit a two-run homer in the fifth for Kansas City. Escobar, who reached three times, also scored in the eighth on Dakota Hudson's wild pitch.

Jordan Hicks got four outs for his third save in seven chances.

The Royals (35-81) picked up their 81st loss at the earliest point in franchise history. The 2005 Royals were 38-81 on Aug. 17 on their way to a team record 106 losses.

ERROR-FREE

The Royals have not committed an error in 11 straight games, tying the club record.

MOLINA TIES RED

Molina's third-inning double was his 352nd, tying Red Schoendienst for seventh-most in Cardinals history.

CARDS ADD WISDOM

The Cardinals purchased the contract of infielder Patrick Wisdom from Triple-A Memphis, where he was hitting .289 with a .363 on-base percentage and 14 homers. Wisdom's 31 home runs last year ranked fifth in the minors, but he wasn't added to St. Louis' 40-man roster and wasn't selected in the Rule 5 draft.

"Disappointed, I wouldn't use to describe my feelings," Wisdom said. "I would just say frustrated. I was like 'OK, obviously I need to get better.' I didn't pout or anything. I took it head on and kept working. Things worked out."

TRAINER'S ROOM

Cardinals: OF Yairo Munoz (sprained right wrist) was placed on the 10-day DL. He aggravated the injury on a swing Friday. He will see a hand specialist Monday. ... RHP Luke Gregerson (shoulder impingement) was transferred to the 60-day DL.

UP NEXT

Cardinals: RHP Luke Weaver is 6-10 with a 4.66 ERA in 23 starts heading into Sunday's series finale.

Royals: RHP Jakob Junis is winless in his last seven home starts.