PHOENIX, Arizona (AP) – Emmanuel Rivera homered and hit a two-run double in the seventh inning to help blow open a close game as the Arizona Diamondbacks beat the Pittsburgh Pirates 9-3.

Rivera started the season with Kansas City before being traded to Arizona at the deadline for right-hander Luke Weaver. Rivera hit a solo homer off JR Brubaker in the fourth inning Thursday.

Trailing 3-2 in the seventh, Arizona tied it on Alek Thomas’ bases-loaded groundout off Chase De Jong.

Rivera followed with a his double off Yerry De Los Santos and Daulton Varsho hit a three-run double high off the wall in center to put Arizona up 8-3.