TORONTO — The Toronto Blue Jays are showing signs of slowly recovering from their worst start in the franchise’s 40-year history.

With starting pitcher Francisco Liriano (1-1) providing the Jays with 5 1/3 innings without allowing a run and helped by two double plays, the Jays snapped a two-game winless streak to defeat the Boston Red Sox 3-0 at the Rogers Centre on Wednesday night. The game was played in front of an announced paid attendance of 30,842, but there was considerably less than that in attendance because the Toronto Maple Leafs were playing nearby at the Air Canada Centre in their Stanley Cup playoff series against the Washington Capitals.

The Jays are now 2-12 on the season. The win was their second in four games.

The Red Sox, who beat the Jays 8-7 Tuesday night in the opener of the three-game series, dropped to 9-6. They came into the game with a four-game win streak.

Liriano was starting for only the third time this season, and threw 83 pitches, 55 of them strikes. After lasting only a third of an inning in his season opener, he has pitched five or more innings in his last two games.

Rick Porcello (1-2) took the loss for Boston. Last year’s American League Cy Young winner did not give up any earned runs in seven innings. It was a combination of back-to-back errors by the Sox in the second inning that spoiled what was otherwise a good outing. He came into the game with an earned-run average of 7.56 in three starts, surrendering 14 earned runs in 16 2/3 innings. He threw 110 pitches against the Jays, 76 of them strikes. He gave up six hits, one walk and had five strikeouts.

Eduardo Rodriguez replaced Porcello in the eighth. Rodriguez had just been activated from a paternity leave list.

The Jays took an early 3-0 lead in the second inning when third baseman Darwin Barney singled up the middle, driving in shortstop Troy Tulowitzki and catcher Russell Martin. Both reached base on back-to-back throwing errors by third baseman Pablo Sandoval and first baseman Mitch Moreland. Left fielder Ezequiel Carrera drove in Barney from second after he advanced to second on a single by Kevin Pillar.

Boston had a chance in the fifth end when Liriano walked leadoff hitter Xander Bogaerts and one out later Sandoval singled to give Boston runners at first and second. But it ended when Sandy Leon hit into an inning-ending double play.

In the sixth inning, Boston had runners on first and second with one out, after which Liriano was removed in place of reliever Joe Biagini. He induced designated hitter Hanley Ramirez into an inning-ending double play.

In 1 2/3 innings, Biagini did not allow any hits. He was replaced in the eighth by Jason Grilli and he served up a single to Sandoval to open up the inning. He then struck out catcher Sandy Leon and induced second-baseman Dustin Pedroia into a ground out. Sandoval advanced to second. Grilli walked center fielder Andrew Benintendi after that, but the Sox couldn’t advance their two runners when right fielder Mookie Betts grounded out.

Roberto Osuna retired the Sox in the ninth inning to record the save.

NOTES: Jays CF Kevin Pillar had three hits and two stolen bases. … Jays 1B Justin Smoak was robbed of a chance to record an out in the sixth inning when a ball that was hit into the stands was taken away from him by a spectator, who was promptly booed by the crowd. … Jays RF Jose Bautista took fielding practice at third base for the second consecutive day. … Jays manager John Gibbons said before the game he was considering giving C Jarrod Saltalamacchia some work at designated hitter. … Sox LHP Brian Johnson was optioned to Triple-A Pawtucket. … Red Sox LHP David Price, who hasn’t played this season because of an elbow strain, had a “good work day,” according to Farrell, adding he hopes the former Jay will be able to start throwing from the mound on Friday. … Farrell had praise for C Sandy Leon, who started Wednesday’s game, and C Christian Vasquez, who backed him up. “We’ve got two very capable catchers, well-above average defenders and when we start either guy, there’s not a dropoff, and what that’s allowed them to do is to remain a little bit more fresh. It’s a demanding position, and when their legs are fresh, they’ve probably got a better chance to get good swings. With Sandy starting every three of five and Vasquez the other two, so far it’s been productive.