The closeness of the vote told one story: 294 for Marion Barry, 289 for Patricia Roberts Harris. Neither one received the necessary two-thirds majority to win endorsement for mayor from the Washington Metropolitan Labor Council, the umbrella group for organized labor in Washington. The unions left the meeting divided.

Behind the scenes, however, lay another--a story of one deal that could have given a unanimous, second-ballot endorsement to either candidate and another disputed agreement that probably short-circuited the first.

A few days before the endorsement meeting at the Capital Hilton Hotel last week, Harris supporters on the council, mostly unions from the private sector, met with Barry's backers, most of whom are unions from the public sector.

The meeting was convened by council president Joslyn Williams, who wanted very much for the council to support someone and reaffirm itself as a power in city politics. In 1978, the council supported Walter E. Washington for mayor. He lost.

Ron Richardson, president of the Hotel and Restaurant Employees Union Local 25 and an ardent supporter of Harris, proposed that the endorsement go to whichever candidate got the most votes on the first ballot, even if there was just one vote difference. Richardson asked that both sides agree to fall in line on a second ballot to give the winner the necessary two-thirds majority.

Barry's forces, led by William Lucy, a former Walter Washington supporter who is secretary of the American Federation of State, County and Municipal Employees, caucused. The message Lucy brought back from the caucus: no deal.

"If the division is that sharp then giving an endorsement really doesn't mean anything," Lucy told a reporter later, explaining the refusal. "It's better just to let folks go their own way."

Richardson and others who attended the meeting cited another reason for the actions of the Lucy caucus: contracts that Barry and the public sector unions had agreed to earlier this year that included promises of no layoffs in city-funded programs, an agency shop rule that ensured more dues for the unions' treasuries and new optical and dental care plans for union members.

In exchange for the contracts, the union leaders involved had agreed to support Barry. If they subsequently agreed to Richardson's proposal and Harris got a majority of the votes on the first ballot, the public sector unions would be committed to endorsing Harris, and that would violate the agreement they had made with Barry.

Public sector union leaders do not acknowledge publicly the deal over the contracts or the role it may have played in their refusal to accept Richardson's offer. Instead, they accuse Richardson and the other Harris supporters of violating still a third agreement--an unwritten law, they say, of union brotherhood.

"The mayor is our boss. We're the ones dealing with him," said Lucy. "And if we say we want to endorse him, in the past they members of other unions have supported us."

"If it was a question of something involving their bosses in Fairfax or Prince George's or wherever, we're supposed to defer to them. They broke that deal," Lucy said.

"That's asinine," Richardson said of Lucy's rationale. "Out of 10,000 members of my union, 7,500 live in the District, more than AFSCME and more than AFGE (American Federation of Government Employees)."

"My members are the . . . people taking it on the chin. They're the ones suffering when Barry destroys workmen's compensation, unemployment compensation and gives away the city to the Board of Trade." He said the public sector unions merely were intimidated by their boss.

When the council finally met a few days later, the split between the two union groups was apparent, but there was an emphasis on keeping any animosity out of what was literally a smoke-filled room.

The executive board of the council, largely comprising public sector union representatives, recommended Barry's endorsement, but he failed to get the necessary two-thirds majority.

Richardson then asked for a vote on whether to endorse Harris, but Lucy asked instead that no endorsement be made, and his position prevailed.

Afterward, Williams predicted minimal damage from the lack of an endorsement. "All the unions have pledged themselves to work for labor when the dust settles and one candidate is in office," the labor council president said.

But by then the damage had been done. The next day, each set of unions went its separate way, and the united front that Williams and others had hoped for in this campaign for mayor had become an impossibility.

Only hours after the vote, Richardson and Barry talked on the telephone. Barry told Richardson not to expect any help from Barry on discretionary matters affecting Richardson's union. Richardson reminded Barry that Barry was the mayor of the whole city, not just those who endorsed him.

That's true, Barry told Richardson, adding, "but not for you or your people."