TORONTO -- The Toronto Blue Jays' bullpen is sometimes subject to criticism this season, but it heard nothing but praise Wednesday afternoon.
"The bullpen did an awesome job," Happ said. "Picked me up, picked the team up. A good win today."
Happ (9-3) allowed six hits, four walks and two runs in five innings. The left-hander struck out eight, including his final three batters, before Gavin Floyd replaced him in the sixth.
"It was a battle," Happ said. "I felt like I was executing some pitches, I suppose I was just missing there. Four walks is too many."
Floyd, Drew Storen, Jason Grilli and Roberto Osuna followed with one scoreless inning apiece. Osuna pitched a perfect ninth to earn his 14th save of the season.
Arizona starter Robbie Ray (4-6) allowed a three-run homer to Martin and a solo shot to Encarnacion to account for all four runs he allowed in 5 1/3 innings. The left-hander gave up four hits and two walks and had eight strikeouts.
Josh Donaldson doubled and Encarnacion walked with one out in the first before Martin hit his sixth homer of the season to put Toronto into the lead.
"I think the tone was set early with the three-run homer," Diamondbacks manager Chip Hale said. "It was a mistake, and really, if you keep the Toronto Blue Jays in the ballpark, you have a good chance of beating them, and that was the one thing we really preached to our pitching. So the mistakes that we made went out of the ballpark today."
Arizona scored once in the third inning, leaving the bases loaded. Jean Segura walked with one out. Phil Gosselin singled to right field, and Segura scored and Gosselin took third when the ball hopped past right fielder Darrell Ceciliani for an error. Happ allowed two walks before finishing the inning.
The Diamondbacks scored again in the fourth on a one-out double by Yasmany Tomas and a two-out single by Michael Bourn.
Encarnacion led off the home sixth with his 19th homer of the season to increase Toronto's lead to 4-2.
"(Encarnacion) is capable of going off at any time, and it's huge for us," Happ said. "We look forward to more of that. Tulo's starting to do it, too. It's a good sign for us."
Ray has 54 strikeouts in eight road starts this season, but he could not contain the Blue Jays' power well enough.
"I just made a couple mistakes and left the ball over the middle of the plate when I was trying to go in or get the ball away, and they made me pay for it," Ray said. "They're a team that can hit, and they can hit homers, and this is a ballpark conducive to that. Overall, I feel like I beared down those last four, five innings and at least gave us a chance to get back into this."
Zack Godley replaced Ray with one out in the sixth and, with two outs, allowed the 10th homer of the season by Tulowitzki. It was the Toronto shortstop's second home run since returning from the disabled list on Saturday.
"He had been swinging pretty good before he hurt his thigh," Blue Jays manager John Gibbons said. "It's in there. He's done a great job since he's been back."
Tulowitzki and Martin struggled in the early part of the season, but both have rebounded lately.
"They're a big part of our team," Gibbons said. "At their respective positions, they're among the best. Nobody is trying harder than those guys, They've been so good their whole careers, so it's just a matter of time. That's the way we feel anyway."
Donaldson was replaced at third base in the ninth by Darwin Barney.
"He had a bad neck all day," Gibbons said of Donaldson. "We did think about him not playing, but he wanted no part of that. We took him out (in the ninth) for his own protection."
NOTES: Toronto traded LHP Wade LeBlanc to the Seattle Mariners for cash or a player to be determined. LeBlanc, 31, who pitched in Japan last year, was 7-2 with a 1.71 ERA in Triple-A Buffalo this season. ... Diamondbacks 1B Paul Goldschmidt had a 13-game hit streak and a 23-game on-base streak end Tuesday when he went 0-for-4 with two strikeouts. He went 2-for-2 with two walks Wednesday. ... Toronto OF Ezequiel Carrera (sore Achilles tendon) did not play. Darrell Ceciliani played right field in his place, and 2B Devon Travis batted leadoff. ... Toronto has Thursday off before RHP Aaron Sanchez (7-1, 3.35 ERA) faces White Sox LHP Carlos Rodon (2-6, 4.16 ERA) Friday in the opener of a three-game series at Chicago. ... D-backs RHP Zack Greinke (10-3, 3.54 ERA) faces Rockies RHP Eddie Butler (2-4, 6.26 ERA) on Thursday in the opener of a four-game series at Colorado.