Perdomo's prediction to Contreras in the batter's box? It came true

This browser does not support the video element.

MILWAUKEE -- Geraldo Perdomo has long been a fan of William Contreras, and the Diamondbacks' shortstop feels the two have a decent friendship.

So on Wednesday night with Contreras behind the plate for the Brewers, Perdomo stepped up to the plate in the top of the eighth inning for Arizona, which was riding a three-game losing streak and clinging desperately to a one-run lead.

The first two pitches of the at-bat were sliders. The first Perdomo took for a strike, while he swung and missed at the second.

Perdomo then turned to Contreras.

“I just told him like, ‘He won’t get me out with that pitch,’” Perdomo said.

Pitches three and four of the at-bat were once again sliders, and Perdomo fouled them off.

Contreras and pitcher Nick Mears decided to come back with a curveball that Perdomo took for a ball before laying in a fastball, which he fouled off.

Finally on the seventh pitch, the Brewers’ batterymates went back to a slider. It was over the plate but below the strike zone, and Perdomo reached down and hooked it inside the foul pole and just over the wall in right field for a homer that proved to be the difference in Arizona’s 3-2 win at American Family Field.

“I always like conversations with Contreras,” Perdomo said. “He’s one of my favorite players. I feel like he and I have a really good relationship. At least God helped me to make good contact on that ball. When I crossed home plate, I told [Contreras], ‘I told you [that] you wouldn’t get me out on that pitch.’”

This browser does not support the video element.

And what did Contreras say back?

“He just looked at me,” Perdomo said. “It was a really good pitch. That guy is a good pitcher.”

It was a nice win and moment of levity for the Diamondbacks, who have suffered through a frustrating season.

This browser does not support the video element.

Perdomo has been a bright spot for Arizona, finding another level at the plate while continuing to play solid defense at shortstop. The homer was his 15th of the year.

“That's somebody that's very confident, comfortable, knowing who he is and what his swing is going to do on a certain pitch at a certain time,” manager Torey Lovullo said. “He's a much-improved hitter from three years ago when we first saw him. He's very talented, and he can do special things. [He has] great barrel awareness, and he's having a tremendous season.”

This browser does not support the video element.

Arizona got an outstanding pitching performance from Ryne Nelson, who allowed just one run over six innings. The right-hander did not walk a batter and fanned three.

This browser does not support the video element.

In sophomore season, Blaze's flame keeps on growing

Still, the Diamondbacks trailed 1-0 until the sixth when Blaze Alexander hit a two-run homer to right field.

The Brewers had a big scoring opportunity in the seventh, but Caleb Durbin grounded out with the bases loaded to end the inning. Milwaukee did inch closer in the bottom of the eighth when Contreras hit a home run of his own to pull the Brewers to within one at 3-2, before Andrew Saalfrank earned the five-out save.

More from MLB.com