Long before Cleveland Indians shortstop Francisco Lindor delivered a game-winning grand slam in the top of the ninth inning against the Texas Rangers Wednesday night, he was getting counselled in the visitor’s dugout at Globe Life Park by the very person he cost the victory: pitcher Danny Salazar.

Salazar spoke with Lindor in an effort to lift his spirits, and it worked, as the third-year shortstop blasted a pair of home runs to seal the 9-6 come-from-behind victory over the Rangers, which gave the Indians a three-game sweep in Texas for the first time since 2008.

“Things like this are going to happen in games all the time,” Salazar said. “Even if we lose a game because something like that can happen, those are things where you have to keep your head up and try to do your job right the next time.”

During the top of the ninth inning, Lindor turned on a 1-1 pitch over the plate and smashed the offering from Rangers closer Sam Dyson inside the foul pole for his first career Major League grand slam.

Indians third baseman Yandy Diaz got the ninth-inning rally going when he smacked a leadoff single to center field, which outfielder Tyler Naquin followed up with a single of his own to left. After a lineout from catcher Yan Gomes, outfielder Abraham Almonte drew a walk to load the bases.

Designated hitter Carlos Santana followed with an RBI walk with the bases loaded, which set the table for Lindor’s blast.

“It’s amazing,” Salazar said of the Indians’ offensive response late in the game. “It’s amazing, especially in the fifth inning with that play, Lindor is going to put his head down a little bit. I told him, ‘Nothing happened. We’re going to get them. You’re going to get them,’ and he did. He took the game for himself. He got the W.”

In his first start of the season, Salazar allowed five hits and five runs, four of which were earned, to go along with four walks, but recorded nine strikeouts over 5.2 innings of work. Salazar located the strike zone on 64 of his 102 pitches.

“My fastball was (working),” Salazar said. “I was getting ahead with my fastball, and then, bringing my changeup after that. That was a good mix.

“I was aggressive with every pitch, and nothing if I threw a ball like, ‘Why did I throw that pitch there?’ If not, just try to come back on the next pitch and try to execute it. I got wild a little bit, but I think I did my job out there.”