BALTIMORE, AUG. 9 -- The best scriptwriter would have trouble writing a more ironic ending to the Baltimore Orioles' turbulent week.

Alan Wiggins, one day back from a suspension, scored the winning run in the ninth inning for a 5-4 win over the Texas Rangers today before 22,525.

And the game-winning RBI? Courtesy of Ray Knight, who has been one of Wiggins' harshest critics.

After Knight's two-out single past third baseman Tom O'Malley, as the Orioles gathered to celebrate in front of the mound, Knight and Wiggins hugged. Briefly.

Both said they would rather talk about baseball than past problems.

"Alan and I talked and we got everything ironed out," Knight said. "We talked man to man. I offered my hand in friendship and he accepted it.

"More than anything, I'm glad that he and I are on good terms."

Asked if the game's end was the perfect script, Wiggins said: "Was it? I don't know. I'm glad we won. That's what you guys {reporters} would say."

When Wiggins ran for Larry Sheets, who had singled with one out in the ninth, he was greeted with more boos than cheers from the crowd.

Mitch Williams relieved starter Charlie Hough, who had thrown 141 pitches. Terry Kennedy singled through the box to move Wiggins to second.

Dale Mohorcic, the Rangers' top reliever, then threw the ball into center field trying to pick off Wiggins. Wiggins took third, but center fielder Oddibe McDowell threw Kennedy out at second.

"I wouldn't have gone on the first pitch," Wiggins said. "I wanted to see what he {Mohorcic} would do first."

John Habyan got the victory in relief of Eric Bell, allowing one hit in 3 1/3 innings.

He gave up an RBI single to the first batter he faced, which gave Texas a 4-3 lead. From then on, though, he retired 10 in a row.

Manager Cal Ripken Sr. said Habyan pitched very well "on a day that he looked like he might be a little tired . . . It was another great performance."

"I didn't get the hitters early," Habyan said, "but after that first inning I felt a little better and felt like I could go a long time."

Bell was given three separate one-run leads, but couldn't hold them, giving up three bases-empty homers to the middle of the batting order.

The Orioles got a run in the first. Ken Gerhart led off with a bloop double between center fielder Bob Brower, left fielder Pete Incaviglia and shortstop Scott Fletcher. Gerhart went to third with one out on Don Slaught's passed ball and scored on Cal Ripken Jr.'s fly ball.

If the top three batters in their order (they went one for 11) had done their job as well as the middle three, the Rangers would have won big.

Larry Parrish, batting fifth, tied the game in the second with his 24th homer. Fred Lynn untied it in the bottom of the inning with his 16th homer on one of Hough's knuckleballs.

Mike Stanley, the No. 6 hitter, homered to left to make it 2-2 in the top of the fourth. In the bottom half, Cal Ripken just missed another homer when Brower leaped against the wall in left center.

Gerhart singled home Kennedy (on a hit-and-run with Ron Washington at first) in the fifth, giving Baltimore a 3-2 lead. But Incaviglia, batting cleanup, homered in the sixth for a tie.

After giving up a single to Stanley, walking Slaught and throwing a wild pitch, Bell was replaced by Habyan, who had given up one run on four hits in his last 17 2/3 innings.

O'Malley, batting for Steve Buechele, singled to right to drive in Stanley for a 4-3 lead.

In the home sixth, Cal Ripken led off with a walk and, with one out, Lynn fell behind 0-2. But Lynn, who had hit .220 lifetime against Hough before today, worked the count to 3-2.

With Ripken running, Lynn singled to left on a knuckler.

"He doesn't throw me anything but knuckleballs unless there's nobody on. I'd say about 98 percent of the time," Lynn said.

Sheets popped to shallow left. Shortstop Fletcher, running away from the infield, caught the ball but collided with Incaviglia. Incaviglia, facing the play, probably had a better chance at Ripken. But Fletcher had no play at all, and Ripken tagged and scored the tying run well ahead of Fletcher's throw.