The Maryland Rainbow Coalition, a statewide organization inspired by the Rev. Jesse Jackson's 1984 presidential bid, voted today to endorse Attorney General Stephen Sachs for governor and Democratic Rep. Michael D. Barnes for U.S. Senate.

Sachs, who aggressively wooed black activists, had been expected to win the group's endorsement, and he received strong support.

Barnes' endorsement came after an intense internal struggle and followed days of behind-the-scenes maneuvering by his backers and those of fellow Democratic Rep. Barbara Mikulski.

The coalition's choices, which followed the first formal appearance of Gov. Harry Hughes in a public forum as a candidate for Senate, drew protests from delegates from Howard County and from supporters of Mikulski who complained that the rules were skewed by the leadership to favor the designees.

"It was not a democratic process," said Clay Chavers, a Howard County lawyer and Rainbow Coalition member who supports Mikulski, who represents Baltimore.

Chavers criticized a voting procedure adopted by the group's leaders that required a vote of two-thirds of the members present to overturn recommendations of the coalition's 12-member endorsement committee. Fewer than 100 persons voted at the meeting.

Later in the day, the two candidates for the Democratic gubernatorial nomination, Sachs and Baltimore Mayor William D. Schaefer, exchanged the first public salvos of their campaign in a pointed exchange before about 200 Democrats at a party dinner in Westminster.

Many attending wore political buttons for one of the two candidates and applauded or cheered when Sachs or Schaefer spoke.

Sachs said that he would support whichever Democrat wins the September primary contest, but he added: "Unity, however, in the November election doesn't mean silence in March."

In recent weeks, Sachs repeatedly has criticized Schaefer for failing to respond to his charges of secret dealings and an unwillingness to state his position on such issues as gun control.

"Which one of us can best be trusted to prevent a return of cronyism to Annapolis?" Sachs asked.

Schaefer, who sat with his arms folded during Sachs' remarks, responded minutes later with his own sallies.

"It seems like a political rally -- who can stomp their feet the hardest," he said. Sachs, he implied, should respond to questions about some of his own positions.

"Savings and loans, that's in there, too," Schaefer said. "Business climate, that's in there, too."

Sachs has been criticized as antibusiness because of some actions by his office's regulatory division.

"I've been criticized that I'm too close to the private sector," Schaefer said. "I hope to get closer."

Earlier, at the Rainbow Coalition's meeting, Deputy Attorney General Eleanor Carey won the organization's support in her bid to be state attorney general, beating out Democratic opponents Russell (Tim) Baker and Lt. Gov. J. Joseph Curran.

Today's endorsements are advisory, and local affiliates of the coalition in Maryland's counties will be able to make their own endorsements, said Alvin Thornton, a Howard University professor who is coordinator of issues for the coalition.

Thornton said the slate chosen yesterday represents "a diversity of leadership" that reflects the organization's goals. He defended the voting procedure, saying that it reflected the organizers' right to choose who they will support.

But some observers, whose candidates were not listed on the ballots distributed today, complained that the group's backing is more symbolic than significant.

"It's like New Hampshire," said Daniel Henson, a Baltimore developer who supports Baker for attorney general. "It doesn't mean a hill of beans in the final analysis. But it's early and it's an endorsement."

Today's activities took place against a backdrop of heightened political activity by candidates for the state's top offices, much of it directed at the black communities that gave Jackson victories in the state's most populous areas in 1984.

"It is a mistake to assume that the Jesse Jackson phenomenon was an extension, exclusively, of his personality," said Thornton. Toward that end, members said, the coalition hopes to capitalize on voter registration and participation gains made in 1984 to advance their local agendas.

While Sachs had vigorously sought the votes of black activists, Schaefer, did not appear before the group. Coalition members said Schaefer had not responded to a questionnaire mailed to all candidates. Thornton said later that Schaefer had committed "an affront."

Hughes, who has not announced his candidacy, fielded questions on his role in the savings and loan crisis and his civil rights record. Unheard was the governor's customary disclaimer that he cannot discuss politics until the end of the legislative session in April.

A fourth candidate, Baltimore County Executive Donald P. Hutchinson, did not attend. Socialist Party candidate Bob Kaufman of Baltimore was present and addressed the group.

Mikulski, who was fund-raising in San Francisco, was represented by her campaign manager and volunteers.