Brandon McCarthy pitched well enough to win his seventh straight decision.
Instead, McCarthy suffered his first loss since April 21, snapping his career-high six-game winning streak, as the Kansas City Royals rallied for a 3-2 victory over the Oakland Athletics.
"It stunk," McCarthy said. "It was a bad loss for us across the board. These are games we expect to win and games we have been winning all year."
The Royals scored two runs with two outs in the seventh.
"I'm not happy with myself," McCarthy said. "There are a lot of things I could have done better. Giving up runs, I don't like to do that. I don't like doing it late in the game. I don't like doing it with two outs."
McCarthy, who is 6-1 with a 2.45 ERA in his past nine starts, gave up three runs, two earned, and seven hits in 6 2-3 innings, while walking none and striking out four.
"It was pretty much the way we've seen him pitch this season," A's manager Bob Melvin said. "He was economical. He threw less than 100 pitches again."
Eric Hosmer, Lorenzo Cain and Chris Getz hit consecutive doubles, the first Kansas City extra-base hits of the game, in the seventh. Cain, who was in a 2-for-24 skid, doubled home Hosmer to tie the score.
"He got two outs and then threw a changeup to Hosmer that he hit and then Cain, he probably didn't get the pitch where he wanted to," Melvin said.
Left-handed reliever Sean Doolittle was brought in to face Getz. After fouling off five pitches with two strikes, Getz stroked an opposite-field double on the 11th pitch to bring home Cain.
"I tried everything," Doolittle said. "It's really frustrating when you locate. I thought I located pretty well. He fouled off a couple of breaking balls and a couple of pitches were down and away and he didn't take the bait, just off the strike zone.
"I was mixing it up, working both sides of the plate, executing my pitches. To have a long at-bat like that and not get him out really stinks."
Will Smith (4-4), a 23-year-old rookie left-hander, limited the A's to two runs and five hits, while striking out five and walking one. In winning his past two starts, Smith has allowed four runs and 11 hits in 14 innings.
The Royals scored an unearned run in the first. Alcides Escobar, who reached on a fielder's choice, stole second and advanced to third on catcher Derek Norris' throwing error. Escobar scored on Billy Butler's grounder to Josh Donaldson, who threw home high and late.
The Athletics tied it in the second. Chris Carter led off with a double and he stopped at third on Donaldson's single and scored on Brandon Moss' single.
Donaldson, who was recalled Tuesday from Triple-A Sacramento, homered in the fourth inning to give the A's a 2-1 lead.
"Brandon pitched great," Donaldson said. "He was one pitch away from sealing the deal for us. They (Royals) weren't taking very good swings."
Greg Holland worked around a leadoff single in the ninth to collect his fourth save in five opportunities.
Notes: Royals manager Ned Yost said, "it was sad, sorry to hear it," upon learning Giants OF Melky Cabrera, who played last season for the Royals, had been suspended 50 games after testing positive for a performance-enhancing substance. . A's RF Josh Reddick was scratched from the lineup after having complications from a tooth extraction. . LHP John Lamb, who was the Royals' top pitching prospect, struck out two in a scoreless inning Tuesday for the Royals Arizona Rookie League club. It was Lamb's first appearance since May 19, 2011 for Double-A Northwest Arkansas and having Tommy John surgery. .RHP Luke Hochevar is the Royals starter for the series finale. Hochevar is 0-7 with a 6.96 ERA in eight career starts against the A's. Oakland will counter with rookie RHP Dan Straily.