BOSTON (AP) -- Chris Davis had a much better day as a designated pitcher than as a designated hitter.
In the first major league game since 1925 in which both teams put a position player on the mound, Davis overcame an awful day at the plate by pitching two scoreless innings and getting the win as the Baltimore Orioles outlasted Boston 9-6 Sunday in 17 innings.
Davis went 0 for 8 as the DH, striking out five times and grounding into a double play. Yet in a season full of surprises for the Orioles, the first baseman by trade delivered the biggest one yet in his pro pitching debut.
"I was like ‘Sweet! I get to try something different today -- because hitting ain't working,' " Davis said. "Basically, that was my first thought."
Adam Jones hit a three-run homer in the top of the 17th off Darnell McDonald, an outfielder the Red Sox turned to once their bullpen was empty.
Boston got two runners on to start the 17th against Davis. With a fastball in the mid 80s, he struck out Adrian Gon zalez and got McDonald to ground into a double play to end a game that took 6 hours, 7 minutes.
The last time two teams brought in position players to pitch in the same game was Oct. 4, 1925, when Hall of Famers Ty Cobb of Detroit and George Sisler of the St. Louis Browns closed out the second game of a doubleheader on the last day of the season, STATS LLC said.
The last time any position player wound up as the winner was May 25, 2011, when Philadelphia's Wilson Valdez threw a scoreless inning in a 19-inning victory over Cincinnati.
Baltimore and Boston each used eight pitchers before going to Davis and McDonald.
"Just when you think you've seen it all, some days you come out here and just assume the position. That was fun," Baltimore manager Buck Showalter said. "It was a long day, but you like to get something good out of it."
J.J. Hardy had a career-high five hits, including two homers, as Baltimore completed its first sweep at Fenway Park since 1994 and won its fifth in a row. The shortstop also made a relay to the plate that cut down the potential winning run to end the 16th.
Robert Andino hit a three-run shot for the Orioles, who improved to a major league-best 19-9.
Boston has lost five straight. McDonald had scored the tying run as a pinch runner in the eighth, and took the final swing against Davis.
"He had pretty good stuff. He had a lot of life on his balls -- more than I expected," McDonald said. "I don't know what was worse -- giving up the three-run home run or grounding into a double play to end the game."
Said Red Sox manager Bobby Valentine: "He tried to throw it over and got hit out of the park."
"I wish there was another option," he said.
Boston rookie Will Middlebrooks hit his first major league homer, a grand slam that tied it at 5 in the fifth inning. Gonzalez finished 0 for 8.
Davis was having a tough day when Showalter told him to go to the bullpen and begin warming up.
"I waited as long as I could to even break it to Chris," he said. "You don't put somebody in that position. It's like asking somebody if they want to walk somebody or not. It's not their decision, it's yours."
The first batter Davis faced was Jarrod Saltalamacchia, who struck out. After Middlebrooks flied out, Marlon Byrd reached on an error by third baseman Mark Reynolds.
Mike Aviles followed with a double, but was thrown out at the plate. Jones ran down the ball in left-center field and threw a strike to Hardy, and his relay was in time as Byrd barreled into catcher Matt Wieters.
McDonald, who pitched one inning last year in his pro mound debut and gave up two runs, took over in the 17th and walked Wilson Betemit, who was thrown out trying to steal.
Hardy doubled, Nick Markakis walked and Jones hit a drive over the left-field wall.
Boston made it 6-all in the eighth when McDonald, pinch running for David Ortiz, scored on a sacrifice fly by Saltalamacchia.