Cal Ripken's dramatic two-out eighth-inning home run gave the Baltimore Orioles a 5-4 victory over the Kansas City Royals tonight at Memorial Stadium.

That was the ending, but before that, teams hooked up to play a game that had a little of something for almost everyone. There were a pair of home runs from rookie Jim Traber, two spectacular defensive plays by center fielder Fred Lynn and, finally, another closing performance by Don Aase.

"When you play a game like this," Lynn said, "you suddenly get the feeling you might do something in the race."

Oddly enough, the American League East race already is doing weird things. The Boston Red Sox lost today for the seventh time in nine games, and a race that once appeared to be over, isn't -- because the New York Yankees are four games out of first place.

Meanwhile, the fifth-place Orioles (50-43) have knocked three games off Boston's lead in a week -- down to seven games.

"All I've heard is that New York was on fire, that New York was going to catch Boston," Orioles Manager Earl Weaver said. "Well, we're only two behind the Yankees in the loss column, and if those people are right, we're only two games out of first place."

Weaver's logic aside, the Orioles did win for the ninth time in 14 games tonight, and they did it in style, with their third four-home run game of the season (Lynn hit the other one tonight).

They did it with some of their usual formulas, especially Aase (4-3), who pitched the final 1 2/3 innings, and with his 25 saves has figured in 51 percent of the Orioles' victories.

They also got Lynn's 16th homer, in the third inning off Kansas City starter Bret Saberhagen, and Ripken's 15th, off Bud Black (4-5) in the eighth.

And they got what Weaver called "a gift from heaven."

That gift is Traber, recalled from Class AAA Rochester last week when Eddie Murray went on the disabled list. Traber was going to get a chance to hit while Murray was injured, but more than that, at 24, he was going to get a chance to show he belonged in the big leagues.

After four games, he's hitting .375 (six for 14) with a double, three homers and seven RBI. Tonight, he hit an opposite-field home run to left off Saberhagen in the second, driving in two runs.

Then in the fourth, he pulled one down the right field line, this one with the bases empty.

His second homer impressed the 24,777 fans enough that they called him back on the field for the first curtain call of his major league career. Traber was up briefly with the Orioles in September 1984, activated only because the club was hit hard by injuries. He wasn't being looked at for a spot on the 1985 team -- and knew it.

"This is different," Traber said. "The last time, I was just glad to be here with the big names and all that. Now, it's a chance. Hopefully, I can fit into a place on this team."

The game ended a torturous day for the Royals, who learned shortly after arriving at the stadium this afternoon that Manager Dick Howser's brain tumor was malignant. Before the game, acting manager Mike Ferraro told reporters about a dozen times, "If the game would just start, I might be able to get my mind off things."

The Royals took a 2-0 lead in the top of the first when Hal McRae and Frank White singled and scored on singles by Jim Sundberg and Lonnie Smith. The Orioles tied it in the second when Ripken singled and Traber hit his first homer.

One of the things the Orioles liked about Traber this spring is that he has enough of a hitch in his swing to hit the ball to all parts of the field.

The Royals went back in front, 4-2, off Orioles starter Storm Davis in the third inning when George Brett singled and McRae hit his fourth homer of the season. In his career, McRae has hit .550 off Davis (11 for 20), with three doubles, a homer and seven RBI.

The Kansas City lead didn't last long because Lynn -- only two for 21 off Saberhagen -- homered in the last of the third, and Traber made it 4-4 with another in the fourth.

After that, things slowed down. Weaver removed Davis after a one-out walk to Mike Kingery in the fifth inning, and Bordi pitched three shutout innings, helped by Lynn's spectacular defensive plays in the sixth and eighth.

In the Royals eighth, Brett got a leadoff single to center. McRae was safe on a fielder's choice, and White lined a single to right.

With the lead run on second, Weaver wasted no time going for Aase, who struck out Steve Balboni on three pitches but walked Sundberg to load the bases.

Ferraro sent Jorge Orta up to bat for Argenis Salazar, and Lynn sprinted into right-center to make a diving catch to save a hit and a run -- and the 4-4 tie. (Earlier, he had banged into the center field wall for a catch against Sundberg.)

"What can you say?" Weaver asked. "You make plays like that, you win games."

As the eighth ended, the crowd brought Lynn out of the dugout for an encore -- the first of his career because of a defensive play.

"I wasn't even going after it," Lynn said, "but the ball hung. It was a tough play because I had to backhand it and get my thumb under it. That's a good feeling. It's disheartening for a team. They're thinking, 'Okay, we take the lead.' Then it's, 'No, we don't.' You like to come back and score right after that."

They did, thanks to Ripken.