Scott McGregor staggered to his 10th victory of the season as the Baltimore Orioles, getting five doubles, broke a two-game losing streak and defeated the Oakland A's, 7-5, tonight.

McGregor gave up 10 hits, including bases-empty homers to Dwayne Murphy and Tony Armas, before Manager Earl Weaver relieved him with two out in the eighth, two on and the tying run at the plate.

Tim Stoddard came in and retired pinch hitter Wayne Gross on a long fly to right for the third out. Stoddard got through the ninth for his eighth save despite giving up a run and facing the potential winning run at the plate.

The Orioles got to four Oakland pitchers for 12 hits, the other seven singles. Gary Roenicke went three for five, with two doubles, and drove in two runs.

The end came quickly for Matt Keough, who entered the game winless in seven starts at Oakland Coliseum. The Orioles scored five runs off him in the second inning on five hits and a walk.

After Cal Ripken Jr. singled and Roenicke doubled him to third, it looked as though Keough would escape. He got Rich Dauer to ground to third and Rick Dempsey on a harmless foul to the catcher.

But Lenn Sakata walked, loading the bases, and Dan Ford unloaded them with a drive off the fence in right-center, the three-run double making it 3-1.

Ken Singleton singled in Ford and went to second on center fielder Murphy's ill-advised throw to the plate.

Eddie Murray followed with an RBI double, causing A's Manager Billy Martin to call in left-hander Bob Owchinko from the bullpen. It was Owchinko's first appearance since June 23, when he pitched himself into the doghouse by walking a left-handed hitter on four pitches.

The damage had been done by this time, with Keough's earned-run-average 5.68, 8.79 at home.

Rickey Henderson, Oakland's all-star left fielder, scored the game's first run. He opened against McGregor with a single, went to second on a ground out, stole third and came in on another ground out.

It was Henderson's 82nd steal in 86 games. Lou Brock, who stole 118 bases in 1974 for a major league record, didn't steal his 82nd until the 121st game of that season.

Murphy gave the A's their second run with his 15th homer, a 410-footer in the third.

McGregor pitched out of a no-out jam in the fifth after walking Henderson and giving up an infield single to Murphy. Jeff Burroughs forced Murphy and Cliff Johnson ended the inning by grounding into a double play.

But McGregor couldn't escape Armas, the first batter in the Oakland sixth. Armas hit the second pitch he saw over the left field fence for his ninth homer. It reduced the Orioles' lead to 5-3.

The Orioles increased it to 7-3 on Roenicke's two-run double in the seventh. Singleton opened the inning with a single off Owchinko. One out later, Benny Ayala, pinch hitting for John Lowenstein, singled, chasing Owchinko and bringing in right-hander Dave Beard.

Ripken greeted Beard with a shot off the reliever's foot. It would have gone into center for an RBI single, but instead bounced directly to first baseman Johnson, who stepped on the bag for the second out.

Roenicke then hit his second double of the game, a drive down the left field line that even the speedy Henderson couldn't stop as Singleton and Ayala scored.