TORONTO -- Arizona's biggest inning in almost two years gave left-hander Robbie Ray all the cushion he needed against the struggling Blue Jays.
Ray (5-3) struck out 10 in 6 2/3 innings to stop a two-start losing streak as the Diamondbacks recorded their fifth sweep. Arizona has won six of eight following a five-game losing streak.
"This was huge, a three-game sweep," Ray said.
Eduardo Escobar had three hits and reached base five times for the Diamondbacks, who hadn't had a bigger inning since scoring nine times in the eighth against San Francisco on Aug. 27, 2017.
"We have a very potent offense," manager Torey Lovullo said.
Lourdes Gurriel Jr. hit a solo home run for the Blue Jays, who were swept for the seventh time. Toronto has lost four in a row and 14 of 17, falling a season-worst 19 games below .500 at 23-42. It's their worst position since being 20 games under on Aug. 23, 2002, when they were 53-73.
"We know if we play our A-game and play well we can beat the best teams in baseball, like the Yankees," Blue Jays manager Charlie Montoyo said. "If we don't play our best we can lose to anybody. We can't show up with our B-game or C-game. It's not going to work."
Ray allowed two runs and five hits and walked one. He became the second pitcher in Diamondbacks history to strike out 10 or more in three straight games against American League opponents. Hall of Famer Randy Johnson did it in the 2000 and 2001 seasons. Ray fanned 10 against Texas on April 10 and struck out 11 at Tampa Bay on May 8.
"He did a great job," Lovullo said.
Clayton Richard (0-2) allowed season worsts of seven hits and seven runs in 2 2/3 innings, the shortest of his four starts with Toronto.
Arizona did all its damage in the third, scoring seven times after there were two outs and none on.
"It's one of the characteristics that this team walks around with: they don't shut down," Lovullo said. "They play hard, no matter what the circumstances are. Today was a perfect case of that. With two outs, we had a big inning."
Marte started things off with a one-out homer, his 15th.
Escobar hit a two-out single and advanced on a wild pitch before walks to David Peralta and Christian Walker loaded the bases for Kevin Cron, who hit a two-run single. Pinch-hitter Jarrod Dyson loaded the bases again with an infield single before Tim Locastro chased Richard with a three-run triple.
Kelly homered on the first pitch he saw from Blue Jays left-hander Thomas Pannone. The two-run drive was his seventh.
"It was a mad swing," said Kelly, who had struck out to begin the inning. "I didn't want to get out again."
Gurriel Jr. homered in the first and Danny Jansen made it 2-0 with an RBI double in the second, but that was all for the Blue Jays. Toronto has scored two runs or fewer in four straight games.
Diamondbacks: SS Nick Ahmed (left foot) was replaced by Dyson in the third. Lovullo said Ahmed was injured Saturday and could return as soon as Monday. Dyson went to center field and Marte moved in from center to play shortstop. ... OF Adam Jones (right hamstring) was held out of the starting lineup for a fourth straight game. Jones ran on the field and shagged fly balls before the game. He last played Tuesday.
Blue Jays: 3B Vladimir Guerrero Jr. got the day off.
Ray has 101 strikeouts this season. Last season, he didn't reach 100 until Aug. 11.
SKY IS FALLING
Toronto is 0-4 when the Rogers Centre roof is open.
Montoyo said struggling RHP Edwin Jackson (0-4, 11.90) will make his next scheduled start, Wednesday at Baltimore.
"We don't have anybody else," Montoyo said.
Diamondbacks: RHP Taylor Clarke (1-2, 4.43) starts the opener of a three-game series at Philadelphia. Clarke has allowed two earned runs or fewer in three of his four starts. RHP Jerad Eickhoff (3-3, 4.14) starts for the Phillies.
Blue Jays: RHP Trent Thornton (1-4, 4.73) starts Tuesday as the Blue Jays begin a three-game series at Baltimore. Thornton has not figured in the decision in four straight starts since his first career win, May 14 at San Francisco. The Orioles have not named a starter.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Pirates look to bust out of slump against Phillies
The Philadelphia Phillies and Pittsburgh Pirates, who open a weekend series Friday at PNC Park, did not get off to great starts coming out of the All-Star break.
Boone dubs Yanks 'savages' during rant in 6-2 win over Rays
The Savages of The Stadium. That's what the New York Yankees are in the mind of manager of Aaron Boone.
Red Sox travel to face struggling Orioles
The Boston Red Sox have been searching for consistency all season and trying to remain a factor in the hunt for a playoff spot. They will keep trying to do both when coming to Baltimore to start a weekend series with the slumping Orioles Friday night.
Boone goes on profane rant as Yanks top Rays 6-2
Yankees manager Aaron Boone got fired up at a rookie umpire in a profane rant , and New York awoke from a sleepy start to rally past the Tampa Bay Rays 6-2 in a doubleheader opener Thursday.
Tanaka lurks as pigeon snacks on leftover seeds
Unexpected company joins Masahiro Tanaka by the Yankees' dugout as a pigeon nibbles on some leftover sunflower seeds.
Gardner beats dugout to a pulp, Boone gets tossed
Brett Gardner gets rung up on strikes and heads to the dugout to release his frustrations with some lumber, leading to Aaron Boone promptly getting ejected.