BUFFALO, N.Y. - Randal Grichuk and Travis Shaw homered, Nate Pearson returned from an elbow injury to earn his first major league win and the playoff-bound Toronto Blue Jays beat the Baltimore Orioles 10-5 Friday night.

Shaw narrowly missed a multihomer game, hitting a double in the seventh that struck the top of the wall in right field and bounced back into play.

Pearson (1-0) had been sidelined since a game Aug. 18 at Baltimore. He came on to begin the fourth and struck out the first batter he faced, Austin Hays, on three pitches.

“It felt really good to be back to myself out there,” Pearson said.

The hard-throwing rookie right-hander got five outs on 24 pitches before being replaced by Shun Yamaguchi. Manager Charlie Montoyo said he wanted Pearson to have a multi-inning stint.

“He passed that test,” Montoyo said. “He came back throwing hard still.”

A starter before his injury, Pearson will pitch out of the bullpen in the playoffs, something he last did in college. The Blue Jays have been without closer Ken Giles for much of the season because of an elbow injury that will require surgery.

“I'm excited to watch him for us in the post-season,” said right-hander Taijuan Walker, who opened the game with three perfect innings. “He's going to be one of those weapons that I think no one really knows about. He's going to come in and just light up the radar gun and get big outs for us.”

Pearson reached 101.5 mph on his strike three pitch to Hays. It was the fastest pitch by a Blue Jays pitcher since tracking began in 2008, eclipsing a 101.2 mph pitch by Brandon Morrow in 2014.

“It's an electric arm, it's electric stuff,” Shaw said of Pearson. “Especially in short stints out of the bullpen, he can just let it all go. That's going to be a huge, huge key for us, a big weapon for us to use out of the bullpen.”

Toronto clinched its first post-season berth since 2016 by beating the Yankees 4-1 on Thursday. The Blue Jays are assured of at least a wild card and are a game behind New York for second place in the AL East.

Grichuk hit a leadoff shot off Jorge Lopez in the second, his 11th, and Toronto scored six runs in the inning, sending 10 batters to the plate.

Toronto chased Lopez and added two more in the third before Shaw connected on a two-run shot off Tom Eshelman in the fourth.

Lopez (2-2) allowed eight runs and nine hits in two-plus innings, losing for the second straight start. He's 0-2 with an 11.20 ERA in five games against Toronto.

“Tonight just wasn't his night,” Orioles manager Brandon Hyde said. “They hit him hard, no two ways around it. They beat us with a lot of hits against the shift that hurt us. He had a tough time staying out of the middle part of the plate.”

Baltimore's Ramon Urias and Cedric Mullins hit back-to-back solo home runs off Shun Yamaguchi in the fifth, and Jose Iglesias connected off the Japanese right-hander in the sixth.

Orioles rookie Ryan Mountcastle went 2 for 3 with a walk.

TRAINER'S ROOM

Blue Jays: GM Ross Atkins said INF Rowdy Tellez (knee) is unlikely to be healthy in time for the opening round of the playoffs. ... RHP Jordan Romano (strained right middle finger) threw a second bullpen session Friday and remains in the mix for a post-season roster spot. ... INF Cavan Biggio got the day off, his first of the season.

Orioles: Renato Nunez (knee) sat for the second straight game but was available off the bench and is likely to play again before the season ends, manager Brandon Hyde said.

WINNING SEASON

A 95-loss team in 2019, Toronto's 31st victory assured it will finish with its first winning record since going 89-73 in 2016.

BIG IN BUFFALO

Toronto is 16-8 at Sahlen Field.

ONE-SIDED BIRD BATTLE

The Orioles have gone 1-7 against the Blue Jays this season.

UP NEXT

Baltimore LHP John Means (2-3, 5.02) faces Blue Jays RHP Matt Shoemaker (0-1, 4.71) on Saturday night. Means is 2-1 with a 2.74 ERA in four September starts. Shoemaker returned from a sore shoulder to pitch three innings against the Yankees on Sept. 21.