PHOENIX -- The D-backs made a pair of Trade Deadline deals on Thursday morning and afternoon, but they didn't expect either of them to have an effect on the game that night.
After trading away two everyday starters for a trio of prospects, the D-backs planned to move forward this season with what general manager Kevin Towers called "internal options."
One of those options, Andy Marte, powered the D-backs to a series-opening 7-4 win against the Pirates just hours after joining the team.
"They told me, 'Be ready. You might pinch-hit,'" Marte said. "I went to the cage and started getting loose. ... It feels great to be back."
After coming in as a pinch-hitter for reliever Oliver Perez, Marte lifted a fly ball off Pirates starter Jeff Locke (2-3) that landed a few rows into the left-field stands, giving the D-backs a 5-3 lead in the bottom of the sixth.
The homer was Marte's first in the Major Leagues since 2010, which was also the year he last played in a big league game.
"I feel like I'm back," Marte said. "It was awesome."
Said Locke: "I didn't even know he was on the team. Had no idea. I haven't seen him since we were in Braves camp. I got a changeup in the zone, and he's got some power and hit it."
It wasn't just a memorable day for the 30-year-old former top prospect. Manager Kirk Gibson entered the D-backs' record books with his 338th managerial win, eclipsing Bob Melvin for most victories in franchise history.
Gibson celebrated the record after the game, arriving to his normal postgame news conference soaked after what he described as a "little beer shower by the boys."
"We'd like to do those type of celebrations [when we] win a world championship," Gibson said.
Gibson can attribute the record-setting win to some power bats and a lucky break.
The D-backs first got on the board after they loaded the bases in the fourth inning. Down 2-0, pitcher Josh Collmenter hit a grounder to Pirates third baseman Pedro Alvarez. First baseman Ike Davis couldn't corral Alvarez's low throw and it dribbled away, allowing two runs to score.
The D-backs jumped ahead the next inning on a single by another "internal option" at third base, Jordan Pacheco, who got the start at Martin Prado's former spot and responded with a pair of hits.
"Jordan played good today," Gibson said. "He came up here, his shoulder was hurt, [he] tried to hang out for a while. He's much fresher, more confident. We know he can hit."
In the top of the sixth, the Pirates knotted the game up on a solo homer by second baseman Neil Walker, which forced Collmenter out of the game after 5 1/3 innings of three-run ball.
But the D-backs came right back with a trio of homers.
Two batters after Marte gave the D-backs the lead, second baseman Aaron Hill added to it, roping a solo shot into the D-backs' bullpen.
After the Pirates showed some life and cut the lead to two in the seventh inning, shortstop Nick Ahmed hit his first Major League home run to finish off the scoring as Oliver Perez, Evan Marshall, Brad Ziegler and Addison Reed combined for 3 2/3 innings while giving up one run and striking out five.
"[I] didn't make some pitches early on," Collmenter said. "Guys picked me up, though. The bullpen threw great again. Marte with a big hit, Ahmed with his first home run. So it's fun watching those guys."
Adam Lichtenstein is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.