DETROIT, JUNE 27 -- One out away from another loss, something odd happened to the Baltimore Orioles tonight: a victory, 4-2, over the Detroit Tigers before a stunned crowd of 32,395 at Tiger Stadium.

Trailing, 2-1, with two out in the ninth inning, the Orioles got the lead when Lee Lacy doubled over center fielder Chet Lemon, who appeared confused on the play. The hit scored two runs, and Baltimore got another when Rene Gonzales followed with a single.

Both hits came off Detroit reliever Willie Hernandez, who entered the game with one out in the ninth and was trying to protect the lead for Frank Tanana (7-4), who had pitched magnificently.

"This is a good one, but any win is a good one for us," Orioles Manager Cal Ripken Sr. said. "We played well, but that's because we got good pitching. You always look good when you're getting the pitching. Then you just need a timely hit or two."

Of Lacy's hit, he said, "I didn't know if it was catchable because I've seen Chet Lemon make a lot of tough catches."

Besides the victory, the best news for the Orioles (31-43) was good pitching, as Mike Boddicker and Tom Niedenfuer put together a 12-strikeout five-hitter.

Boddicker again was sharp, allowing two earned runs in 6 2/3 innings, giving Baltimore starters a 1.89 earned run average in the last four games. He left in the seventh because of back spasms, and Niedenfuer (1-0) retired seven in succession for his first victory in the American League.

"I've been getting sharper," Niedenfuer said. "It also helps to face a team the second time. {Pitching coach} Mark Wiley helped me work out a mechnical problem last week, and that seems to have turned it all around."

He was standing in the middle of a clubhouse that was celebrating only its fifth victory in 28 games. Until the ninth, it looked like another loss.

Tanana, who had extended Baltimore's scoreless streak to 22 1/3 innings before giving up an unearned run in the seventh, entered the last inning with a 2-1 edge, allowing five singles.

He got Cal Ripken Jr. on a fly to center to open the ninth. Eddie Murray then singled to right, and when Ray Knight singled to left, Detroit Manager Sparky Anderson brought in Hernandez, the American League's 1984 Cy Young award winner.

He got Mike Young on a fly to right and went to two strikes on Lacy, who hit a hanging slider to dead center. Lemon sprinted back, turned one way, then the other and almost made the catch.

"It's easy to comment on a play like that afterward," Anderson said, implying Lemon should have caught the ball.

Lacy disagreed, saying, "That ball was hit on a line. I hit it good. This is a good one for us. For a while, we couldn't do anything right."

For a second straight game, the Tigers started with Lou Whitaker getting on base and Darrell Evans homering for a 2-0 lead. The hit was the 2,000th of Evans' career and his 361st homer, tying him with Joe DiMaggio for 31st place on the all-time list.

It was also the 106th allowed by the Orioles, the 61st in the last 36 games.

Boddicker was terrific after that, striking out nine and leaving four Tigers on second base. For a spell, it appeared not to matter because as the ninth began the Orioles hadn't scored an earned run in 24 innings.

Tanana didn't allow a hit until Young beat out a single in the second. He didn't allow a runner to reach second base until catcher Dave Van Gorder got there on Alan Trammell's error in the sixth. He kept the Orioles scoreless that inning by getting Ken Gerhart on a fly to left, Alan Wiggins on a pop to first base and Ripken Jr. on a grounder to third.

The Orioles did stop their scoreless streak -- and Tanana's, 15 1/3 innings -- in the seventh, thanks to two Detroit errors. Knight reached first on one by third baseman Tom Brookens and went to third on Young's third single.

Lacy then hit a hard grounder that got past second baseman Whitaker, scoring Knight. But it remained 2-1 when Gonzales followed with a double-play grounder.

Boddicker was gone in the seventh after getting Whitaker on a grounder. He'd been bothered by back spasms since the first inning, and with Brookens on second, Ripken Sr. brought in Niedenfuer, who struck out Evans to end the inning.

"My arm was kind of dead at the beginning, but it got better," Boddicker said. "The big thing was the mound was so flat, and I think that's what caused me to hurt my back. We needed this one badly."

Orioles Notes:

General Manager Hank Peters says he's unsure that free-agent picher LaMarr Hoyt wants to resume his baseball career, but that if he does, the Orioles would like to sign him. Hoyt, 32, will receive about $2.9 million in salary from the San Diego Padres the next three seasons.

If Hoyt decides to play, he'll have to agree to a regular drug-testing program.

"My understanding is that Ron {Shapiro, Hoyt's agent} is going to meet with him, then he'll let us know what Hoyt is going to do," Peters said. "I don't know what kind of shape he's in, but regardless, it would take some time to get him in shape. He could just kiss it goodbye, but the thing is that these fellas grew up playing baseball and still like to play. He may also have some things he still wants to prove."

According to Shapiro, the Braves, Rangers, Blue Jays and White Sox also have expressed interest in Hoyt . . .

Ken Dixon, in his first Class AAA start since 1983, pitched a three-hitter Friday night for the Rochester Red Wings in the first game of a doubleheader. In seven innings, he walked one, struck out six and beat the Tidewater Tides, 2-0, ending a five-game losing streak for the Orioles' top farm team.