BALTIMORE -- The White Sox had been through the routine before. Just 24 hours before, Ronald Belisario stood on the mound and a left-handed pinch-hitter faced him from the batter's box with a chance to deliver another devastating loss.
Belisario once again pitched himself into some trouble on Tuesday night, but this time it was Ryan Flaherty, not Chris Davis, who stood at the plate as the game-winning run and the relief pitcher got the job done.
"It would probably have been better if it was cleaner, but there's just parts of it that you just get it done as a closer and they had some guys put some good swings on it," White Sox manager Robin Ventura said. "But, in the end, he shut it down."
With runners on first and second, Flaherty grounded into a double play to second and the White Sox (36-42) held on for a 4-2 win that left the 20,596 at Oriole Park at Camden Yards just a swing short of seeing their Orioles (40-36) pull out a second straight miracle win.
The win snapped an eight-game road skid for Chicago and a five-game losing streak.
"I would say after the last five days," Ventura said, "we probably needed that."
A day after their usual stopper, Chris Sale, was on the mound, the White Sox got an excellent outing from Jose Quintana. The left-hander allowed just one run on six hits in seven innings while striking out eight and working out of several jams to baffle a typically potent Orioles offense.
For five innings, Quintana (4-7) was virtually untouchable. He allowed just three hits and struck out the side in the fifth before red-hot slugger Steve Pearce led off the sixth with a home run.
He put a runner on second during the seventh with a walk and a wild pitch, but outfielder Nick Markakis grounded into a double play with runners on first and second to end the inning. The White Sox got Baltimore to ground into four double plays and held the O's to 1-for-9 with runners in scoring position.
"Two ground balls for double plays to end two innings," Quintana said. "I think that's a good reason for winning tonight."
During their five-game losing streak, the White Sox struggled to piece together runs without big hits. Just one of the three runs that they scored off of Orioles starter Miguel Gonzalez came on an extra-base hit -- second baseman Gordon Beckham's first-inning homer that gave Chicago the opening run for the first time since Saturday.
The White Sox managed nine hits and pieced together three runs against Gonzalez (4-5) before they ran him from the game after five innings.
"Things was going good offensively for us tonight and we have to enjoy it because it doesn't happen very often," outfielder Alejandro De Aza said. "Every time we go out there that we can do our job, it's great."
After Beckham's home run, De Aza gave Chicago some early insurance with an RBI double that scored Alexei Ramirez in the second. He was thrown out at the plate later in the inning on a double-steal attempt.
Later in the game, though, an aggressive play paid off for the White Sox. Ramirez bolted home on a grounder to second in the eighth and slid beneath catcher Caleb Joseph's tag to up the lead to 4-1.
"Once you catch the ball, it's old rules," Orioles manager Buck Showalter. "That's a good leson for [Joseph]."
Even with the three-run cushion, though, Ventura didn't let Belisario face Davis to lead off the ninth inning, instead opting for the lefty Scott Downs. Belisario replaced Downs after the slugger's single and he eventually managed to end the game and reward his manager's confidence.
For at least one night, the story was different. The White Sox eked out a narrow victory and had a reprieve from their struggles.
"I don't know about a change of pace," Ventura said, "but it's good to get a win."
David Wilson is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.