BALTIMORE (AP) As poorly as they played for the first seven innings, it seemed hard to imagine the Baltimore Orioles would be celebrating an uplifting victory well after midnight.
Then again, strange things happen when the Chicago White Sox are involved.
Nelson Cruz hit a game-tying grand slam in the eighth inning and David Lough scored the winning run on a wild pitch in the 12th to give the Orioles a 5-4 victory Wednesday night.
Nick Markakis had four hits for the Orioles, who won two of three from Chicago - twice in their last at-bat.
''It's big,'' Lough said. ''That's our second walk-off win against these guys. They're a good team. Give credit to them and their pitching staff for holding us.''
The Orioles didn't get a runner past first base against White Sox starter Hector Noesi until the seventh inning and trailed 4-0 entering the eighth. Noesi was pulled after giving up two straight singles, and Scott Downs walked Chris Davis to load the bases with two outs.
Chicago manager Robin Ventura summoned Javy Guerra, the fourth pitcher of the inning, to face Cruz. On a 2-1 pitch, Cruz launched an opposite-field drive that barely cleared the wall in right field. It was his 24th home run, the second grand slam of the season and eighth of his career.
''I had the chance to do some damage in a couple of at-bats before then, but I grounded into a double play twice,'' Cruz said. ''It feels good to get the home run to tie the game.''
Said Lough: ''That's a big-time clutch hit right there, as big as it gets. That's who we want at the plate, because he leads this team. You see what he's capable of doing and the numbers he's put up. He's a special player.''
Neither team threatened before the grounds crew came with the tarp as soon as the ninth inning ended. Rain delayed the start of the 10th for 69 minutes.
Nick Hundley opened the bottom of the 12th with a walk off Daniel Webb (4-2) and Lough entered as a pinch-runner. Lough took third on a single by Markakis and scored easily when Webb uncorked a pitch that got past catcher Tyler Flowers.
''It's tough to lose like that,'' Ventura said. ''Hector threw a great game, but we couldn't hold onto it. We've got to be able to be better at the end.''
Tommy Hunter (2-1) got the final out in the Chicago 12th to earn the win.
''It didn't look like it was a 4-4 game or it ended up being 5-4 in the first seven innings,'' Orioles manager Buck Showalter said. ''Eight innings. Whatever it was. It seems like yesterday. It was yesterday.''
Jose Abreu hit his 23rd home run for the White Sox, Adam Eaton tied a career high with four hits and Flowers drove in two runs. Abreu has four homers and 10 RBIs during his current 10-game hitting streak.
None of it mattered.
''The way we played, we should have (won), but the baseball gods must be upset with us in some way, shape, or form,'' Eaton said.
Baltimore starter Ubaldo Jimenez allowed four runs and eight hits in 6 1-3 innings. The right-hander left the mound in danger of absorbing his ninth loss, but Cruz's slam took Jimenez off the hook.
Until Cruz connected, Noesi and the White Sox dominated.
Abreu provided Chicago a 1-0 lead by hitting the first pitch of the fourth inning into the seats in left.
In the fifth, Alejandro De Aza drew a leadoff walk and scored on a triple by Eaton. The Orioles pulled the infield in, and that resulted in Eaton being thrown out at the plate on a grounder to third.
Flowers hit a two-run single in the seventh to make it 4-0. That seemingly provided a bit of breathing room for the White Sox, whose previous seven games were decided by two runs or fewer.
Unfortunately for Chicago, the lead didn't hold up.
''That was my fault, I put this game on myself,'' Guerra said. ''I have to be better in that situation, no matter what. I need to understand the situation. I feel bad for the team in general because I know I let everyone down.''
NOTES: Baltimore is off Thursday. Chicago sends Scott Carroll to the mound in the opener of a four-game series against host Toronto. ... Orioles RHP Bud Norris (strained groin) was supposed to pitch in Friday's split doubleheader against Tampa Bay. Chris Tillman will start instead, and Norris might not pitch again until Tuesday. He was expected to have an MRI on Thursday, Showalter said. ... Eaton has reached base in 20 straight games and owns a career-best 12-game hitting streak.