TORONTO — John Gibbons wanted to end his time in Toronto on a winning note. His players made sure he got that wish.

The Blue Jays — backed by homers from rookie Reese McGuire and Randal Grichuk — topped the defending champion Houston Astros 3-1 on Wednesday in Gibbons' final home game as Toronto's manager, guaranteeing him a managerial win-loss record above .500.

"I didn't want to end up below .500 because then they call you a loser," Gibbons said with a chuckle hours after the team announced the long-expected news that he would not be returning next season.

"It worked out good, it worked out OK."

The win improved Gibbons to 792-787 over his two stints with the Blue Jays, who wrap up the season with a three-game road series against Tampa Bay this weekend.

General manager Ross Atkins announced that Gibbons, who still had a year left on the contract extension he signed in 2017, would not return in a pre-game press conference that was attended by Kevin Pillar, the team's longest serving player.

"What I learned from being in that interview room was that he was four games above .500 for his career and if we could get one win he'd finish his tenure here as a winner." Pillar said.

"You kinda want to come through that line and give your manager a handshake after a win and it was extra special knowing it was his last one at home."

McGuire, a September call-up, led off the bottom of the fifth with a solo shot off Houston reliever Cionel Perez for his first major league homer.

Grichuk supplied the rest of the offence for the Blue Jays (72-87) with a two-run blast in the first inning and Jon Berti, in his major league debut, singled in the eighth to give Toronto it's third hit.

But Gibbons was the star of the day.

He received a standing ovation from the 22,828 in attendance when he walked to the batter's box to deliver the lineup card before the game. The San Antonio native then waved and tipped his cap to the crowd while retreating back into the dugout.

"This particular group of umpires, I like them all, so I went out and said hello," joked Gibbons, who would rarely bring out the lineup card himself. "Sometimes you've got to play the part, like it or not."

Players hugged Gibbons on the field after the game while a "thank you Gibby" message was shown on the videoboard. Pillar then doused his parting manager with a blue Gatorade shower during his on-field interview and the rest of the team waited in the dugout so Gibbons could lead them back into the home clubhouse one last time.

"I think everyone just wanted to pay respect to our leader that unfortunately won't be coming back next year," Pillar said.

Gibbons is in second place on Toronto's all-time list for managerial victories. Cito Gaston leads with 892.

The 56-year-old Gibbons also managed the Blue Jays from August 2004 to June 2008 and was rehired in November 2012. He led the team to back-to-back American League Championship Series in 2015 and 2016, snapping a 22-year post-season drought in the process.

Right-hander Sean Reid-Foley started Wednesday's game for the Blue Jays, pitching 3 1/3 innings and striking out five — including three straight in the second inning. The rookie didn't allow a baserunner until he walked Jake Marisnick to lead off the fourth.

The walk came back to bite the Blue Jays, though, as Marisnick stole second, advanced to third on a fly out and scored on an infield hit from Carlos Correa.

Chris Devenski (2-3) started for Houston (100-58), which clinched the American League West late Tuesday night after a win in Toronto and Oakland's extra-inning loss in Seattle. Devenski allowed two runs on one hit in two innings of work.

Joe Biagini (4-7) earned the win and former Astros closer Ken Giles, acquired in the trade that sent Roberto Osuna to Houston at the July 31 deadline, pitched the ninth for his 25th save.

Berti, whose contract was selected from double-A before the game, made his MLB debut after eight seasons in the minors. The 28-year-old started at second base and batted ninth in Toronto's lineup.

There was a nice moment between Gibbons and Berti in the fourth when Gibbons walked out to pull Reid-Foley. Noticing he was on the videoboard, Gibbons pulled Berti in to get him some screen time.

"I felt better for Berti today than I did for myself," Gibbons said. "We tried to get him up here a couple times and things just didn't line up. ... Now he can say he made it to the big leagues. He hit two rockets today and one of them landed, that's always big. So yeah that was more important to me than anything today."