Humiliated, 10-0, in the first game and three runs down before they came to bat in the nightcap, the Baltimore Orioles fought back tonight for a 4-3 victory to divide a doubleheader with the Kansas City Royals.

Scott McGregor and Tim Stoddard blanked the Royals on two hits over the last eight innings and Terry Crowley produced the winning run with a pinch-hit sacrifice fly in the sixth.

The comeback restored the faith of Oriole fans in the crowd of 19,352. They had hooted their heroes earlier, as a grand-slam homer by Frank White and the seven-hit pitching of Larry Gura and Renie Martin sent Baltimore to its 10th loss in 14 games.

The Orioles had contributed to that 10-0 disaster with some dreadful fielding and impotent relief pitching, so it was with trepidation that they watched McGregor yield first-inning home runs to Willie Wilson and Amos Otis that gave the Royals a 3-0 lead in the second game.

"It wasn't a shock, but it wasn't a good feeling," said Manager Earl Weaver. "I was pleased when our guys came in and said it didn't mean anything, that we could come back. But then they'd said that when we were behind 5-0 in the first game."

This time the Orioles made good their boast. Eddie Murray drilled a two-run homer, his 10th, in the first off lefty Paul Splittorff and Rick Dempsey tied the game with No. 4 in the second.

McGregor, in a complete turnabout, retired 16 straight Royals before departing after six innings. So it was still 3-3 when Jim Wright took over for Splittorff in the sixth.

Ken Singleton lined a single to right and took third on Murray's double over first base, which the Royals vainly urged umpire Durwood Merrill to rule foul. Then Weaver sent John Lowenstein up to bat for Gary Roenicke and Wright walked him intentionally. After Jose Morales struck out, Crowley batted for Cal Ripken Jr., zero for two in his first major league start, and drove Darryl Motley against the fence in right with his game-winning sacrifice fly.

Stoddard ran into trouble in the ninth, as Wilson beat out a roller toward third base and stole second on a close play that had Oriole catcher Rick Dempsey kicking dirt in disgust. But Jamie Quirk lined to shortstop Mark Belanger, George Brett completed a zero for nine night by flying to right and Hal McRae, a five-hit man, ended it with a grounder to Murray at first.

"I felt good in the first inning, but Wilson hit a fast ball out after I threw two past him and I made a mistake coming back with a change-up to Otis after I fooled him with one," said McGregor, who had excellent control, walking none and throwing only 64 pitches. "I could have kept pitching, but I felt my shoulder tightening up and six innings was enough. The stamina isn't there yet."

Jim Palmer's six-inning assignment in the opener reduced his record to 3-5 while his earned-run average dipped to 2.84, best among the Oriole starters. Palmer mowed down the first seven Royals before he was betrayed by his defense.

Roenicke dropped Quirk's slicing fly ball to left with one out in the third to give Kansas City its first base runner. U.L. Washington doubled to right and, with two out, McRae sent two unearned runs scurrying home with a double into the left-field corner.

Palmer retired seven more in a row before singles by Wilson and McRae, plus Otis' sacrifice fly, made it 3-0 in the sixth.

Reliever Dave Ford was touched for two runs in the seventh on White's double, Washington's RBI single and McRae's double. That outburst brought lefty Jeff Schneider to the mound for his major-league debut at age 27, and he always will remember that he retired the first batter he faced, Brett, on an infield grounder.

Schneider will try to forget what followed. In the eighth, Willie Aikens walked and singles by Otis and Motley filled the bases for White, who lofted his second career grand slam over the fence in left.

Before Schneider got the third out, Kansas City had scored a 10th run, on singles by Washington and Wilson and an egregious error by shortstop Lenn Sakata. Uncertain whether to trap or catch McRae's humpbacked liner, he let it go under his glove and through his legs.

The boos resounded at that miscue and the crowd did not accept the Royals' fast start in game two with good grace. But eventually it was pacified.

"That's baseball," Weaver said. "That's why they keep coming out to watch. You never know what will happen next."