Adam Dunn gets mobbed after hitting a solo home run in the ninth inning to give the White Sox a 3-2 win over the Orioles. (Charles Cherney/AP)

Here at U.S. Cellular Field — where fireworks are launched past center field after every home run the White Sox hit — the Fourth of July celebration on Chicago’s South Side occurred at the most inopportune time for the Orioles on Thursday afternoon.

After battling back from a two-run, eighth-inning deficit to tie the game, the Orioles lost to Chicago, 3-2, in walk-off fashion on Adam Dunn’s solo homer in the ninth, prompting a celebration at home plate in front of an announced crowd of 21,321.

After retiring the first four hitters he faced in relief of starter Zach Britton, Orioles reliever Tommy Hunter hung a 3-2 curveball that Dunn deposited into the first row of the left-field stands.

“He hit a home run,” Hunter said. “Not a place you’d like to put that pitch. You’d like to bury it. Got a couple righties coming up after that but got a little out front, left the ball up and he hit it. . . . He’s a very strong individual. I got him out pretty good the night before. I think any hitter in the big leagues — if you make too many mistakes to him — you are going to pay for it.”

The Orioles (48-38) dropped two of three to a White Sox team that is 14 games under .500. Now the Orioles head to the Bronx for a pivotal three-game series at Yankee Stadium this weekend.

And while the usually dominant Hunter gave up the game-winning homer — suffering his first loss since the second game of the season, a game that ended on a ninth-inning walk-off homer by Tampa Bay’s Matt Joyce — it was the Orioles’ vaunted offense that truly struggled.

The Orioles managed just three hits and were blanked by White Sox starter Jose Quintana for seven innings, his longest outing in his last five starts. Quintana held the Orioles to just two hits, struck out a career-high 11 and retired the final 13 batters he faced, including eight by strikeout.

“We had what, two hits through seven innings?” said shortstop J.J. Hardy, who was 0 for 4 with two strikeouts. “We were out there grinding. It was tough to put runs on the board and tough to get people on base. It was a good feeling to come back in the eighth and a bad feeling to lose like that.”

Over the past three days, an Orioles offense that averages nearly five runs a game totaled just eight in the entire series against a White Sox team that allowed the most runs in the majors in June (135).

“They pitched real well,” Orioles Manager Buck Showalter said. “Usually I’m the first to say we got to do a little bit better job, but that was solid. It had real late life. We knew coming in that from a starting pitching standpoint we were going to be challenged. They’ve got good starting pitching. It’s not their problem.”

The Orioles wasted Britton’s best big league start of the season. In his fifth start for the Orioles this year, Britton held the White Sox scoreless through his first five innings before the White Sox broke through with two in the sixth.

“He gave us a real good chance to win today,” Showalter said of Britton. “I was real proud of Zach. He pitched aggressively. He kept firing. If we had been able to push a run across there, he would have been the difference-maker. . . . He had a lot of groundballs. Lot of balls beat into the dirt. He pitched well.”

— Baltimore Sun