BOSTON — Shaun Marcum has been pitching well enough to have a winning record, and now he does.

Marcum pitched two-hit ball for seven shutout innings, and Travis Snider homered, doubled and drove in three runs Wednesday, helping the Toronto Blue Jays beat the Boston Red Sox 3-2 to salvage the final of a three-game series.

“Marcum’s pitched great. His record really doesn’t show the way he’s pitched,” Toronto Manager Cito Gaston said. “He’s pitched outstanding. We just haven’t been able to give him any runs a lot of the time. Even today, three runs, but he managed to hang on.”

Marcum (2-1) allowed two singles, both to David Ortiz, struck out six and walked one. It’s the seventh time in eighth starts this year he’s given up three runs or fewer. He entered with a .232 opponents’ batting average, the second-lowest for an AL starter.

He just looked at it as a chance to end the trip with a win.

“It was very important. I had to go out there and pound the zone, make them put the ball in play, try to save our bullpen a little bit,” Marcum said. “Anytime I get the ball I want to go out there, if we’ve lost, and try and stop the losing streak. I think anybody in the rotation wants to do that.”

Toronto had lost its previous five games against Boston this season. The Blue Jays closed their trip at 7-3.

Scott Downs pitched a scoreless eighth and Kevin Gregg got three outs for his 10th save despite allowing J.D. Drew’s RBI double and Adrian Beltre’s run-scoring single.

With a runner on second and one out in the ninth, Ortiz was called out on strikes on a pitch Ortiz appeared to think was outside. Manager Terry Francona argued and was ejected three pitches later by Dale Scott.

“I’m glad I’m not right-handed,” Ortiz said. “I would have been hit in the ribs.”

Darnell McDonald then popped out, ending it.

Tim Wakefield (0-2), in the rotation when Josh Beckett was pushed back because of back spasms, gave up three runs and five hits in seven innings.

But despite the strong start, Wakefield was uncertain whether he would head back to the bullpen or make another start.

“I have no idea,” he said. “It’s been very difficult. It’s obviously a situation I don’t want to be in.”

Wakefield got his 2,000th strikeout when Vernon Wells struck out to end the fourth. He was saluted with a standing ovation when an announcement was shown on the center-field scoreboard as he walked off the field. He came back out of the dugout and tipped his cap.

“I’m very proud of that,” he said. “It’s a tribute to longevity, and I feel very blessed to be able to wear this uniform so long.”

With Toronto leading 1-0 in the seventh, Snider homered into the Blue Jays’ bullpen after Jose Bautista drew a one-out walk.

Snider’s RBI double made it 1-0 in the fifth. Lyle Overbay snapped an 0-for-13 stretch with a ground-rule double when the ball bounced on the dirt in the center-field triangle and into the Red Sox bullpen. Snider hit his double down the first-base line.

Boston’s best chance came in the second when Kevin Youkilis drew a leadoff walk and went to third on Ortiz’s single. But Beltre had a shallow flyout and second baseman John McDonald made a nice grab on Jeremy Hermida’s popup in center to end the inning.