It was like old times for Lorenzo Cain Tuesday night at Kauffman Stadium.

Even though the former Kansas City Royals All-Star center fielder was now hitting leadoff for visiting Milwaukee, he received a lengthy standing ovation from the crowd of 16,555 and his former teammates in the Royals dugout in a 5-2 Brewers win.

And it was the type of return Cain could only dream about as he was 2-for-3 with a homer, two runs scored and a brilliant defensive gem, robbing Jorge Soler of what appeared to be extra bases in center field.

“I’m in a new role now, hitting in the leadoff spot, and I planned on taking the first pitch,” Cain said, “but that ovation got the adrenaline running and I had to swing at the first pitch.”

Before he stepped to the plate, he had a brief conversation with Royals catcher Salvador Perez, who would often take videos of Cain with his phone while they were teammates in Kansas City.

“We had a little hug, he told me he missed me, I told him I missed him and got down to business,” Cain said. “I enjoyed tonight. I expected a good reception from the crowd, and tonight, they really made me feel welcome. It was a good night.”

It was not a good night for Royals starter Ian Kennedy, who had a line drive single by Ryan Braun ricochet off his right foot in the top of a four-run third inning. Following Braun’s infield single, which scored Jonathan Villar, Travis Shaw hit a three-run homer into the right-field fountain.

“It hit right above my pinkie toe on my right foot,” said Kennedy, who saw his streak of 274 career appearances with at least one strikeout come to an end in the loss to the Brewers. “I was pulling off the mound after I got hit and I threw a pitch right down the middle of the plate to Shaw.

“And that’s disappointing. It was a three-run homer that decided the game.”

Kennedy had X-rays taken at the stadium and there was no break in his foot, but he said he will wear a boot the next few days to take pressure off his foot.”

While his return did not lead to a Royals win, Perez had a big night after returning from the disabled list following a sprained knee he suffered carrying his luggage up stairs on the team’s return home from spring training.

Perez hit a solo homer in the fourth and threw out Braun trying to steal second base.

“It was nice to get Salvy and Gordo (Alex Gordon, who returned from a left hip labral tear) back tonight,” Royals manager Ned Yost said. “We scored two runs and one comes on Salvy’s homer and Gordo scores the other run (on a sacrifice fly by Alcides Escobar).”

Gordon finished 2-for-4 with a double.

While Kennedy allowed four runs in three innings, the struggling Royals bullpen allowed just one run in six innings of relief.

“A great job by the bullpen tonight,” Yost said.

ROSTER MOVES: Before the game, the Royals put reliever Justin Grimm on the disabled list with lower back stiffness and called up left-hander Eric Stout from Triple-A Omaha. To make room for Perez and Gordon, the Royals sent outfielder Paulo Orlando and catcher Cam Gallagher to Omaha.