"A lot of teams lose that game," Boston manager Terry Francona said. "We're not a lot of teams."
The victory, coupled with New York's 7-4 loss to Toronto, left the Red Sox and the Yankees tied for the division lead with eight games left. New York and Boston trail Cleveland by 1½ games in the wild-card race.
"A great win," Boston's Kevin Millar said. "It took everything we had to get to B.J. Ryan."
Ryan entered with a 2.32 ERA and 34 saves, but on this night he was no match for the highest-scoring team in the major leagues.
"We beat one of the best," Francona said. "Guys that haven't hit him before hit him today."
Jonathan Papelbon (2-1) worked the eighth, and Mike Timlin gave up an RBI double to Jay Gibbons with two outs in the ninth before retiring Javy Lopez on a flyout to deep right for his 11th save, the second in two games.
"I made it interesting again," Timlin said, "but what's important is that we were one up at the end. This is what we do."
Melvin Mora homered and Gibbons went 3-for-3 with two walks for the Orioles, who have lost seven straight. Baltimore stranded 11 runners, twice leaving the bases loaded and twice failing to bring home runners from second and third.
Despite their inability to get a clutch hit, the Orioles were in it until Renteria's hit fell about 15 feet beyond the infield.
"We hit a couple of bullets and then they break a bat in half and win," Baltimore interim manager Sam Perlozzo said. "When you're going good, those things happen. When you're going bad, those bullets we hit are right at somebody."
That's one reason why the Red Sox have won 90 games and the Orioles are staggering to the finish of their eighth straight losing season.
"Edgar found a way to get the ball where nobody was standing. We had the lead, lost it, got it back," Millar said. "That's what made this game special. We got big hit after big hit."
Boston led 2-0 before the Orioles tied it in the seventh against rookie Craig Hansen, pitching in his second major league game. After Bernie Castro beat out a chopper to third, Mora hit a 2-1 pitch into the left-field seats.
Those were the first runs allowed by Hansen in 14 professional appearances. He gave up a two-out single to Gibbons and a double to Lopez before Mike Myers retired B.J. Surhoff on a popup.
Boston starter Matt Clement pitched six scoreless innings, allowing four hits and a season-high six walks. He held the Orioles hitless through four innings and left with a 2-0 lead, but the bullpen blew his chance to end a three-game losing streak and match his career high in wins (14).
Clement was aided by a defense that produced three double plays. Millar temporarily preserved Clement's no-hit bid by getting a glove on a liner to first by Surhoff in the fourth and making a diving stab of a hard grounder by Castro in the fifth.
After Mora got Baltimore's first hit in the fifth, Miguel Tejada hit a sharp grounder that glanced off Clement to Graffanino, who grabbed the ball while prone at second and salvaged a 1-4-6-3 double play.
"It's been like that this whole streak here," Perlozzo said. "The few opportunities we have where we hit the ball real good, somebody makes a nice play on it."
Bedard retired 19 of the next 21 batters and did not allow another hit until Bill Mueller singled with one out in the seventh.
"I just settled down, didn't try to overthrow the ball and threw strikes," Bedard said.
Clement walked the bases loaded with two outs in the second before retiring Luis Matos on a fly ball. Three walks filled the bases again for Matos with two outs in the fourth, and he hit into a fielder's choice.
- Graffanino returned after missing three games with a strained groin. He went 1-for-4.
- Orioles 1B Rafael Palmeiro, who won't play again this season, turned 41 on Saturday.
- Baltimore went 0-for-6 with runners in scoring position in the first eight innings.