Saying he had grown tired of watching in anguish as the Baltimore Orioles slumped to eight games out of first place, their owner, Edward Bennett Williams, today fired Joe Altobelli and brought back Earl Weaver to manage the team the rest of this season.

Weaver, the team's highly successful manager for 15 years until he retired after the 1982 season, will be reunited with the Orioles Friday night here in Memorial Stadium. Details other than the length of his contract were not revealed, but it is known that he had turned down a $500,000-a-year offer to manage the Texas Rangers this season.

A prior commitment kept him from joining the team tonight and Cal Ripken Sr. managed against the Milwaukee Brewers. Weaver is scheduled to appear at a 10 a.m. news conference Friday. He was not available to comment today.

At a late afternoon news conference at the stadium today, Williams said Altobelli "did not have the kind of leadership that we have traditionally become used to in the Oriole organization." The owner and General Manager Hank Peters obviously are hoping Weaver, 54, will provide that leadership at least until the end of the season, when the managerial position will be reevaluated.

"He's the best possible resource we could get," Williams said. "We're very happy and proud that he came back. I think he came back out of a sense of loyalty to this organization."

Altobelli was not informed of his status until after 3 p.m. today when Williams and Peters had returned to the stadium. They had met with Weaver in downtown Washington at 12:30.

But Altobelli clearly knew what was coming after the team's five-game losing streak, which included a 6-2 loss in Detroit Wednesday night, after Weaver and Williams had their first meeting in Washington Wednesday morning. Altobelli was in his stadium office today, cleaning out his locker at approximately 10:30 a.m., asking: "Am I fired? Does anybody know if I'm fired?"

When he was being escorted to Peters' office at 3 p.m., he looked at a group of reporters and said: "They're taking me upstairs to tell me."

Told that Altobelli earlier had said, "I thought this was supposed to be a classy organization," Williams said, "I'm very sorry that Joe feels that way, because I like him. Nothing he can say now or in the future will change the way I feel about Joe.

"I'm concerned for Joe because he's been bruised. It was not an unclassy act by the Baltimore Orioles. We insisted we tell him face to face, and not by telephone. We told him the very first moment we had to see him face to face. I just wouldn't do it by telephone.

"This is probably the unhappiest day in my six years with the Orioles. The avalanche of speculation, some of it really quite wild speculation, caused him to be bombarded with questions in Detroit (Tuesday and Wednesday nights). It was the avalanche of publicity which Joe found awkward, and which I found vicariously painful."

After leaving the stadium, Altobelli was at Bowie Race Course, where he refused to comment.

"I don't come to the track to talk baseball," he said. He left Bowie after the fourth race.

He had been in the Orioles' organization intermittently for 15 1/2 years and was under contract through this season, with an option year in 1986.

When asked if Altobelli had been offered another job in the Orioles organization, Peters said: "Not at this time."

Williams said the decision to fire Altobelli, who led the Orioles to a world championship in 1983, was reached today. He added the decision to hire Weaver was a completely independent matter, but a "joint decision" that he and Peters came to since Sunday, when the Orioles were beaten, 12-0, in Baltimore by the Boston Red Sox.

Williams told The Washington Post on Monday that he was "very upset" and wouldn't "sit by idly" and let the Orioles continue to slide without making at least a couple of personnel moves. The team's slump hasn't been gradual. Between May 11 and June 12, they fell from first place in the American League East, with an 18-9 record, to fourth, by losing 17 of 28 games. That put them eight games behind Toronto, and only one game ahead of the sixth-place New York Yankees.

Peters again today cited "inconsistency" as Baltimore's primary problem on the field. But it is no secret he is looking for at least one player, an everyday second baseman, and that it might be San Diego's Alan Wiggins. But Williams and Peters also acknowledged today Weaver basically will have to get improvement out of the players he inherits.

Asked what he expects of the team under Weaver, Williams said: "All I ever ask of anyone . . . is to be the very best that he can be. I don't think this team has been the best it can be up until now. I expect that, from now on, until the end of the season."

He said this week marked the first time he had approached Weaver about returning to the Orioles. Williams cited Weaver's .596 winning percentage -- it leads all active managers with five or more years experience. "Nobody alive comes close," Williams said.

In his 15 years, Weaver's Baltimore teams went to four World Series, including a championship in 1970, won the AL East six times and finished either first or second 13 times. They won 100 games five times and 90 or more games 11 times.

After the last day of the 1982 season, Weaver retired and signed a three-year contract as a consultant and a special assignment major league scout for the Orioles. He spent considerable time at home in Miami, playing golf and gardening. He also worked as an analyst for ABC television, but was not rehired this season.

There was constant speculation that he would come out of "retirement" to manage one club or another. The speculation is over. The Earl of Baltimore is back.