When Mayor Marion Barry earlier this week repudiated the anti-Semitic oratory of Louis Farrakhan, he resolved a tricky issue that just wouldn't go away.

Barry, like a lot of other black leaders around the country, was forced to confront a Catch-22 posed by Farrakhan, who has been delivering his message to growing crowds in cities around the country.

The Catch-22 is this: Farrakhan says Jews are wicked exploiters; he also says that any black leader who denounces this assertion is himself in the control of Jewish leaders.

"Any foolish black leader who would come out to repudiate me based upon Jewish control and Jewish money should be thrown out by every black . . . organization," Farrakhan told a crowd of 10,000 who gathered to hear him July 22 at the Washington Convention Center.

By that argument, Barry, in repudiating Farrakhan's anti-Semitic comments, "should be thrown out."

Barry did repudiate Farrakhan's remarks. But it took him a while to get around to it.

His comments to the Interfaith Conference of Metropolitan Washington came long after Jewish community leaders had spoken out and several black religious leaders had written a letter critical of Farrakhan to The Washington Post. The Post itself had published an editorial deploring the "bigtime bigotry" promoted by the leader of the Chicago-based Nation of Islam.

Barry spoke out long after Rabbi Andrew Baker, Washington area director of the American Jewish Committee, and others had asked him to do so.

The mayor's decision to run the risk of Farrakhan's double bind appears to have sprung from a political calculation of some complexity. The complexity accounts for the seven weeks it took Barry to perform his additions and subtractions.

There were several reasons not to speak up. First, the support Farrakhan seems to enjoy among some blacks. Not only did he draw 10,000 to his speech in the Disrict, he has drawn big crowds in Atlanta, Philadelphia, Detroit and Houston.

Farrakhan is expected to conduct a session at the Forum in Los Angeles on Saturday, where he may well take the opportunity to comment on Barry's censure of his earlier speech.

Barry also may have believed that Farrakhan's comments in the District would have a short shelf life. In any case, as he said after his speech to the Interfaith Conference, he did not want to "create a situation" by drawing special attention to Farrakhan beyond the notoriety already stirred here.

The other side of the equation, however, included enough compelling parts ultimately to move the mayor to his condemnation.

It became clear that the issue would not go away. In addition to The Post's coverage, Washington Jewish Week newspaper published at least three editorials imploring the mayor to end his silence. Jewish community leaders met with the mayor.

Moreover, any politician with a wetted finger to the wind could tell that at least some black clergymen weren't reluctant to oppose Farrakhan.

That meant that there was opposition to Farrakhan and, were Barry to pick a bone with the Nation of Islam's fiery leader, he wouldn't be isolated.

Perhaps more important, the mayor is scheduled to visit Israel next month at the invitation of Jerusalem's Mayor Teddy Kollek. The prospect of the Farrakhan controversy spilling into this trip was not a promising one for the District mayor. The last thing Barry, or any other elected official functioning in the "statesman" mode, needs is a messy international incident to mar his image.

Baker, who has been invited to accompany Barry to Israel, hypothesized an embarrassing scenario in which he and other Jewish leaders planning to go with the mayor would have withdrawn if Barry had not censured Farrakhan's remarks.

To complete the equation, Barry and other black leaders may be figuring that it is easier to distance themselves a little from Farrakhan now that the presidential campaign, in which Farrakhan's close relationship to Jesse Jackson was a factor, is over. To knock Farrakhan now does not carry with it an implicit criticism of Jackson.

Ultimately, the mayor decided he could safely reverse himself, especially if he couched his comments in a broad denunciation of group hatred.

"We have a responsibility to protect the human dignity and self-worthiness of every group of people," he said. "We should not sit silently by and let any group of people be denigrated or castigated for their race, their religion, their culture or their state of being."

Then, he added, "I don't think that the mayor of the city ought to express himself every time it happens, every instance."

In this instance, however, Barry found a way.