KANSAS CITY, Mo. -- The Major League Baseball season may be a 162-game marathon, but the Kansas City Royals' sprint to the finish of the first half provided a much-needed boost heading into the All Star break.

Omar Infante had a two-run single with two outs and the bases loaded in the bottom of the seventh to give the Kansas City Royals their first lead of the series in a 5-2 victory over the Detroit Tigers on Sunday.

The Royals averted a four-game sweep with the victory. The win was the Royals' first at home over the Tigers in seven tries this season.

"It (changes the mood) a little bit, even though it's one win," Kansas City manager Ned Yost said. "You feel like you could have taken three out of four with a couple of well-placed hits.

"But we're eight games better than we were last year (heading into the break). It's the difference of being at .500 coming back and being two games over. And it's the difference between being 8 1/2 games out and 6 1/2 games out. This was a big game for us."

The Royals, who led the Tigers by 1 1/2 games in the American League Central on June 18, had fallen 7 1/2 games behind after their third straight loss Saturday. They knew they couldn't go any further behind, even if it meant just one more game.

"We can't be swept (by) the first-place team, or teams we're contending with in our division," said Royals starting pitcher Bruce Chen. "We lost three games, but we didn't go out there and roll over. We played hard and fought all the way to the end against Justin Verlander, one of the best pitchers in the game."

Infante stepped up big against his former teammates. The Royals had trailed in 27 of 33 innings to that point in the series and had not even been tied past the third inning in the first three games.

"It's not easy to (beat) that team," Infante said. "They have great pitching. I was waiting for the right pitch. He threw me a slider and I was ready."

The Tigers leave town with that 6 1/2-game bulge, but they were left lamenting the one that got away.

"It was going pretty well," Detroit manager Brad Ausmus said. "We didn't do a lot on offense. We kind of spread our hits around. They were able to hold off and get all theirs at once."

Verlander (8-8) took the loss for Detroit. He was dominant early, not allowing a runner past second base in the first six innings. But the wheels fell off in the bottom of the seventh.

The Royals loaded the bases with three straight singles. Designated hitter Billy Butler and third baseman Mike Moustakas had solid singles to the outfield before left fielder Raul Ibanez and shortstop Alcides Escobar got infield singles, driving in the first run. Center fielder Jarrod Dyson grounded out to second, driving in the tying run and driving Verlander to the showers.

"Things were going well for us and we ran into the seventh," Verlander said. "A couple of balls fell in the right spots and I'm out of the ballgame. They were able to find some spots. The only hard-hit ball was Ibanez. It was just a fluky game -- a fluky seventh, actually."

Reliever Ian Krol relieved Verlander and walked pinch hitter Salvador Perez intentionally then retired right fielder Nori Aoki on a pop to second, bringing up Infante. Ausmus brought in Al Alburquerque to face Infante.

After Infante's single, first baseman Eric Hosmer hit a ground-rule double to right center off Phil Coke, the fourth Detroit pitcher of the inning, scoring Perez. The hit extended Hosmer's career-best hitting streak to 13 games, the longest by a Royal this season.

Yordano Ventura (7-7) picked up the win for the Royals. He relieved Chen in the sixth inning. He struck out three in 1 2/3 innings. Greg Holland pitched a perfect ninth for his 25th save in 26 chances.

Chen pitched well in his first start since late April. He gave up two runs on eight hits in 5 1/3 innings. He struck out two and walked none and ended up with a no-decision.

Left fielder Rajai Davis led off the third with an infield single. He was moved to third on center fielder Austin Jackson's single to center. Davis scored on a sacrifice fly by first baseman Miguel Cabrera. Jackson then scored from first on a two-out bloop single by right fielder J.D. Martinez. Kansas City left fielder Raul Ibanez was playing deep and Dyson was shaded to right center.

NOTES: There's no place like the road for the Royals. They are one of four teams in the major leagues (Los Angeles Dodgers, New York Yankees and Seattle Mariners are the others) with a winning record on the road and a losing record at home. The Royals are 26-21 on the road and 22-25 at Kauffman Stadium. ... Royals RHP Bruce Chen made his fifth start of the season Sunday, but his first since April 24. He was placed on the disabled list May 2 (retroactive to April 25) with a bulging disk in his back. He is filling the spot in the rotation normally occupied by LHP Jason Vargas, who went on the 15-day disabled list July 10 after an appendectomy. ... Detroit 1B Miguel Cabrera has dominated Chen in his career. Entering Sunday, he ranks first among all Chen's opponents with a .531 on base percentage, second with an .897 slugging percentage and seventh with a .410 batting average. ... Tigers OF Austin Jackson led off the game with a hit for the fourth time in the series.