BOSTON (AP) – Alex Rios had three hits and drove in the go-ahead run, and Shaun Marcum survived a shaky start to win for the first time in nearly a month as the Toronto Blue Jays beat the Boston Red Sox 6-5 on Friday night.

Rios and Reed Johnson hit consecutive RBI doubles in the sixth inning to erase a 5-4 deficit and help the Blue Jays snap a four-game losing streak to the Red Sox. Toronto (44-45) moved into a tie with the New York Yankees for second place in the American League East.

After allowing all five of his runs in the first three innings, Marcum (5-3) settled down to earn his first win since June 16, and improve to 4-1 since joining the rotation on May 13.

Marcum, who spent the first six weeks of the season in the bullpen, allowed seven hits and one walk in six innings. He gave up three earned runs and struck out six.

In his first start since allowing a season-worst eight runs and nine hits in 3 1-3 innings in a 9-4 loss to Cleveland on July 7, Marcum got off to another ominous start when he gave up a two-run homer to Manny Ramirez in the first.

Ramirez, who hadn’t homered since June 20, then had an RBI single and Mike Lowell added a two-run triple during a three-run third that gave the Red Sox a 5-4 lead.

But Marcum settled down, allowing one more hit – a single by Lowell to lead off the sixth.

Jeremy Accardo pitched a scoreless 1 1-3 innings for his 12th save in 13 chances.

Toronto scored two runs with two outs off Boston reliever Kyle Snyder (1-2) in the sixth to take the lead for good.

Vernon Wells drew a two-out walk, then scored on Johnson’s double to right. Johnson scored the go-ahead run on Rios’ double to left.

Rios, who also doubled and scored in the third, improved to 6-for-8 with three doubles and a homer in two games since finishing second in last week’s Home Run Derby.

Snyder allowed two runs and two hits in 1 2-3 innings for the Red Sox, who have lost four of five but still lead the AL East by 10 games.

Boston starter Julian Tavarez allowed four runs and nine hits in four innings.

Notes: Ramirez has 54 career homers against Toronto, his most against any team. … Boston OF J.D. Drew left the game because of tightness in his right hamstring. Drew doubled to lead off the third and later scored. He was replaced in the field by Eric Hinske in the fourth. … Boston RHP Brendan Donnelly (strained right forearm) was scratched from his scheduled rehab assignment in Single-A Lowell after experiencing tightness in his forearm while warming up. … At 27-20, Toronto owns the best record in the majors against Boston since 2005. … Toronto 3B Troy Glaus had two hits and an RBI.

AP-ES-07-13-07 2259EDT