MILWAUKEE, AUG. 4 -- B.J. Surhoff's single scored Glenn Braggs with one out in the last of the 12th inning to give the Milwaukee Brewers a 9-8 victory over the Baltimore Orioles before 19,296 at County Stadium tonight.

With the game tied 8-8, Braggs led off the inning with a single off Orioles reliever Mark Williamson (5-8). Rob Deer followed with a single to right. Braggs stopped at second, and Greg Brock bunted the runners to second and third.

Williamson intentionally walked pinch hitter Ernest Riles to bring up Surhoff, a pinch hitter for Bill Schroeder. The count went to 1-2 before Surhoff grounded a single into right field for the game-winning hit.

"I missed by about a foot and a half," Williamson said. "He goes up there hacking, and I wanted to throw it in the dirt. I did that last year in the {Pacific} Coast League and had a lot of success. If he doesn't swing, I can bust it back inside, but I never got that far."

The loss was the Orioles' fourth in seven games on this road trip. They could have moved to within four games of the fourth-place Brewers. Instead, they dropped to 0-7 against the Brewers and to 4-29 against the five teams ahead of them in the American League East standings.

That the game even lasted 12 innings required a remarkable Orioles comeback.

They led, 5-1, after two innings thanks to homers by Eddie Murray and Ken Gerhart, but Orioles starter Scott McGregor was terrible, lasting 3 1/3 innings and allowing seven hits and seven runs, four of them on Steve Kiefer's grand slam.

The Brewers took an 8-5 lead into the ninth and had gotten a combined nine-hitter from Juan Nieves and Chuck Crim. When Cal Ripken Jr. broke a zero-for-22 slump with a one-out single, Milwaukee Manager Tom Trebelhorn brought in ace reliever Dan Plesac.

Murray greeted him with a single, and Ray Knight's 10th homer got the Orioles an 8-8 tie that lasted until the 12th.

The Orioles (48-58) collected 14 hits off four pitchers. Murray and Knight had three apiece, and Knight and Gerhart had three RBI each. However, the Orioles also left 10 runners on base, including four in scoring position.

The Brewers got 12 hits off three pitchers, with Paul Molitor getting a homer, single and double and three RBI.

Despite the loss, the Orioles continue to get terrific work out of their bullpen. John Habyan worked 4 2/3 innings, allowing a run in relief of McGregor. He has given up one earned run in his last 16 innings.

Williamson followed with three shutout innings. The Orioles bullpen did have a streak of 12 no-hit innings snapped tonight, but overall, they have a 2.08 ERA in their last 13 games.

"We just shouldn't have blown that 5-1 lead," Orioles Manager Cal Ripken Sr. said. "But one pitch was responsible for four of those runs. It might have been one of those nights for Scotty, but Habyan and Williamson pitched great. Habyan is very valuable in that role. We've talked about how important Sammy Stewart was doing that in 1983. He did that tonight."

The night started like it would be an easy one for the Orioles. Bill Ripken singled and Murray hit his 26th homer for a 2-0 lead in the first inning. An inning later, Lee Lacy and Terry Kennedy singled, and Gerhart homered for the 5-1 lead.

But McGregor couldn't hold it. The Brewers got a run in the first on a leadoff homer by Molitor, then five in the third and another in the fourth.

In the third, Dale Sveum led off with a double that Lacy should have caught in right field, and Molitor followed with an RBI single. Robin Yount grounded out, and Braggs flied out. But McGregor couldn't finish them off. He walked Deer and Brock to load the bases, then laid a first-pitch fastball down the middle to Kiefer, who hit it over the left-field fence for a grand slam.

All of a sudden, a 5-1 Orioles lead had become a 6-5 deficit. Despite the walks and the grand slam, Ripken left McGregor in for another inning. Sveum doubled with one out in the fourth, and when Molitor followed with an RBI double to left for a 7-5 lead, Ripken Sr. brought in Habyan.

Habyan was again outstanding, extending his string of scoreless innings to 14 2/3 before Brock tripled in a run for an 8-5 lead in the seventh.

The Orioles had a chance to get back in the game in the sixth, but left the bases loaded.

The rally started when Nieves walked Mike Young, got Lacy on a fly to left and walked Kennedy. Trebelhorn brought in Crim, who got Gerhart on a foul pop, then walked pinch hitter Jim Dwyer to load the bases. He got out of it when Bill Ripken's grounder forced Dwyer at second.

Orioles Notes:

Catcher Terry Kennedy removed himself from the game suffering flu-like symptoms in the 10th inning . . . As expected, reliever Doug Corbett will be placed on the disabled list Wednesday when center fielder Fred Lynn is activated. Corbett returned to Baltimore Monday and was found to have an arthritic condition in his left knee. He has undergone surgery on the knee twice in his career . . . Reliever Dave Schmidt (sore elbow) will definitely miss his next scheduled start (Friday). "Doctors say there's nothing serious wrong, but we don't want to take a chance," Ripken Sr. said . . .

Lynn has missed 13 games. In the first 12, Gerhart hit .310 (13 for 42) with five homers and seven RBI . . .

Lacy played for the first time since July 23 . . . Eric Bell will try to become the first Oriole in two years to pitch three straight complete games. It was last done by McGregor May 22-June 2, 1985.