BALTIMORE (AP) -- The Chicago White Sox were desperately clinging to a ninth-inning lead, hoping for a victory that would put a positive finish on a miserable road trip.
Then, something astonishing happened: Thanks to a fine bit of acting by shortstop Alexei Ramirez, the White Sox actually got a lucky break.
Pinch-runner Chris Dickerson got lost on the bases and was doubled up for the final out, and Chicago ended a nine-game losing streak by holding off the Baltimore Orioles 4-2 Sunday.
Down 4-1, Baltimore loaded the bases with no outs in the ninth against Addison Reed. After Ryan Flaherty grounded into a forceout at second base that scored a run, Dickerson ran for him.
Dickerson tried to steal second on a pitch to Brian Roberts, who hit a foul pop near first base. Dickerson didn't know where the ball went, and Ramirez made it appear that the ball was in play as Dickerson slid into second. The baserunning blunder made him an easy out at first.
''I didn't peek and it ended up in the one place where you're not going to get that awareness reaction from the infielders,'' Dickerson said. ''Especially Ramirez with the deke. That pretty much got me. I assumed there was a groundball hit behind me and he was going to first because I was already there.''
During a lost season in which the White Sox have had little go their way, this one couldn't have ended better.
''I am more glad than surprised,'' said Reed, who earned his 37th save. ''I don't think he knew where it was. Thankfully, he didn't.''
Rookie Andre Rienzo pitched three-hit ball into the seventh inning and Adam Dunn homered for the White Sox.
Adam Jones hit his 31st home run for the Orioles, who went 0 for 11 with runners in scoring position and stranded eight. Baltimore began the day one game behind Tampa Bay in the race for the final AL wild-card slot.
''I think there are times when I think we put a little too much pressure on ourselves,'' said Chris Davis, who went 0 for 3. ''That's the nature of the beast. You want to go out there. Everybody wants to be the guy to get the big hit or score the big run. We had a lot of fun last year. We were really enjoying ourselves and enjoying the competition, and the fact that we were in the race. I think that's something we really need to get back to.''
Dayan Viciedo had two hits and an RBI for the White Sox, who averted a four-game sweep and got a victory to cap a terrible road swing that included three defeats apiece in Boston and Yankee Stadium. Only eight teams in major league history have gone winless on a road trip of at least 10 games.
Chicago (57-85) also avoided falling 30 games under .500 for the first time since ending the 1976 season at 64-97.
''There was a lot of good stuff today,'' manager Robin Ventura said. ''Dunn hit a homer. Seeing what young guys can do. That's part of it. That's part of where we're at right now. I don't know if there is any monkey off anybody's back.''
Making his eighth big league start, Rienzo (2-1) gave up one run and four hits in 6 2-3 innings. The Brazilian native walked two and struck out four in the second-longest outing since being summoned from the minors on July 30.
Rienzo left after giving up a two-out single to J.J. Hardy in the seventh. Flaherty followed with a double off Matt Lindstrom, who struck out Roberts to end the threat.
Bud Norris (10-11) allowed four runs and nine hits in 4 1-3 innings. He was 4-0 as a starter for Baltimore since being acquired in a trade with Houston on July 31.
The White Sox were clinging to a 2-1 lead in the fifth inning when Dunn hit his 31st homer after Alexei Ramirez led off with a single. The drive snapped Dunn's 7-for-65 skid and traveled an estimated 424 feet before landing on Eutaw Street, far beyond the right-field wall.
''The way the game ended we needed that two run homer,'' Ventura said. ''We have been finding a way to make it a one-run game. It's nice to have a cushion.''
The four runs the White Sox scored matched their total in the previous three games of the series.
NOTES: The Orioles open a four-game series against the New York Yankees on Monday night at Camden Yards. Chris Tillman starts for the O's against CC Sabathia. ... Chicago hosts the Detroit Tigers. ''That's the good news. We're going home,'' Ventura said before Sunday's game. ... Baltimore manager Buck Showalter said OF Henry Urrutia, a Cuban defector, will not be allowed to accompany the team to Toronto next weekend because of visa issues. ... Chicago went 3-4 against Baltimore this year and hasn't won the season series since 2008. ... Urrutia and RHP Mike Wright were chosen as the Orioles' minor league players of the year. ... Dunn struck out three times around his home run.