TORONTO -- Russell Martin, Edwin Encarnacion and Troy Tulowitzki all homered as the Toronto Blue Jays earned a 5-2 win over the Arizona Diamondbacks on Wednesday afternoon.

J.A. Happ (9-3) gave up six hits and four walks but struck out eight and gave up only two runs in five innings of work as Toronto (40-34) snapped a three-game losing skid. Gavin Floyd, Drew Storen, Jason Grilli and Roberto Osuna each threw a scoreless inning of relief for the Blue Jays.

Osuna earned his 14th save of the season with a 1-2-3 ninth.

Robbie Ray (4-4) had eight strikeouts, allowing four runs on as many hits over 5 1/3 innings as Arizona (34-40) saw its five-game win streak end. Zack Godley allowed a home run in 1 2/3 innings of relief, while Randall Delgado pitched a scoreless inning.

Martin staked the Blue Jays to a 3-0 lead in the first inning with a three-run blast to left-centre field. Martin's home run scored Josh Donaldson and Edwin Encarnacion.

Darrell Cecilliani, who made his first start in right field for the Blue Jays on Wednesday, allowed a run to score in the third inning when he misplayed Phil Gosselin's one-hop single. Cecilliani's glove missed the bouncing ball, allowing speedy Jean Segura to score from first and Gosselin to advance to third.

Cecilliani was in right field in place of Toronto outfielder Ezequiel Carrera, who sat out with a sore Achilles' tendon. Carrera is himself a replacement in right, recently subbing in for all-star slugger Jose Bautista, who is on the disabled list with turf toe.

Happ followed up Cecilliani's error with two walks to load the bases, but struck out catcher Wellington Castillo to maintain the Blue Jays' 3-1 lead.

Michael Bourn helped the Diamondbacks continue to chip away at Toronto's lead, scoring Yasmany Tomas from second with a single in the fourth inning.

Encarnacion hit his own homer to deep left field on a 1-1 pitch from Ray in the sixth inning to make it 4-2. Encarnacion's blast came on a day when his Edwing celebration -- where he holds his arm out at a 90 degree angle while rounding the bases -- was honoured with a free giveaway shirt with a parrot's wing on the right shoulder.

Tulowitzki brought the sold-out crowd of 46,967 to their feet in the same inning with Toronto's third home run of the afternoon, sending a towering shot over the left-field wall for a 5-2 lead.

Osuna closed out the game for the Blue Jays with two groundouts to second baseman Devon Travis -- the second needing a video review -- and a foul out to Martin.

Notes: Toronto starter Marco Estrada, who was limited to 88 pitches with a sore back on Tuesday night, is not expected to miss any starts. ... The Blue Jays traded minor-league pitching prospect Wade LeBlanc earlier Wednesday to the Seattle Mariners for cash considerations or a player to be named later.