On a Sunday evening last month nearly 700 people - most black Washingtonians - crammed into the Iranian Emabssy, dancing to two different bands under the mirrored ceilings and gobbing up roast beef and fresh strawberries in the name of Africare.

At the opulent Iranian Embassy, loud, swinging parties, hosted by Ambassador Ardeshir Zahedi, are routine. But a gathering for a development program in the impoverished regions of West Africa, supported by a predominantly black, nonofficial constituency, is rare.

Four days later Zahedi gave a buffet dinner for large monetary contributors to Howard University, a group he has entertained before. Today Zahedi will receive an honorary doctorate from Howard during its commencement ceremony.

This set of circumstances among Iran, the second largest oil exporter in the world, Howard, a prominent black istitution, and Africare, a small private group, underscores a growing interest by the Middle East communities with black Washington. It is a social and cultural attentiveness that is being returned by a Jimited segment of blacks, mainly the diplomatic, political and educational alliances.

"All signs point to an awakening taking place on the part of black Americans, as well as the international and other interest groups overseas, such as the Mideast communities, that their futures may be intricately interwoven," says Mel McCaw, director of the 25-year-old African-American Institute.

In a way this building phenomenon may be a long-distance indicator of shifting world alliances. It comes at a time when Middle East interests in Africa, both economic and political, are rapidly increasing. A number of Arab nations have instituted economic boycotts against Rhodesia and South Africa, a move that appeals to black Americans.

In recent months the contacts between the Middle East embassies and black officials and educators have increased noticeably. "I think the overtures have stepped up over the last eight months or so. And I think this kind of coming together is obvious in the concept of the Third World," says Rep. Parren Mitchell (D-Md.), chairman of the Congressional Black Caucus. "I see great potential in the economic arena. What would it mean if OPEC dollars could be spent to develop import-export businesses with blacks?"

Individuals and groups traveling to the Mideast have included Pearl Bailey, Alvin Ailey, Muhammad Ali, a task force from the NAACP, and a delegation to an Arab-African cultural and intellectual dialogue held in the United Arab Emirates last December.

At the convention here this week of the National Arab-American Assn., Donald Warden, a black attorney and businessman from California, who is chairman of Concerned Black Americans for Africa and the Middle East, gave one of the keynote addresses.

Many of the efforts so far have conducted on an individual basis. Mona Negm, an Egyptian woman who lives in Montgomery County, has been organizing the Egyptian Womens Assn. and recruiting black American women, particularly journalists. Helen Haje, an American of Lebanese parentage, who is a consultant on Middle Eastern affairs, has been advising the embassies and other interest groups to become more involved with the black community. Last Christmas the African-American Womens Assn., a group of white and black Americans, Africans, with a few Arab members, had their Christmas party at the Suian Embassy, at the suggestion of the ambassador's wife who just moved to Washington.

At this point the Iranians seem to be the most pronounced users of the social avenues. A year ago, Sen. Edward Brooke (R-Mass.), a good friend of Zahedi, was usually the lone black guest at the embassy, but especially since the three Moslem ambassadors participated in the settlement of the Hanafi seige in March, the guest list has broadened.

Potentially, the self-interests of all groups could be served: the Arabs could court the black Americans as a badly-needed lobbying group and, in return, black institutions and businesses could receive some petrodolars. Right now it does signify sharp public relations for the Mideast groups and an acknowledgement of the growing political strengths of black Americans who could, as another minority, voice sensivity for their concerns.

"This exchange could have a great deal of meaning, especially in respect to foreign policy considerations," says Rep. Charles Diggs (D-Mich.), chairman of the House Subcommittee on African Affairs. "There are people who consider the United States' posture with Israel pretty unbalanced. If this coalition went far enough it could change that outlook."

The connections are not entirely new. Because of the location of eight Arab countries on the African continent, the historical ties are very strong, though the Arabs' early involvement in the slave trade has meant the alliance has not always been benevolent.

"I would call the current period of Arab and black Africa associations a period of rediscovery," says Mohamed Nassim Kochman, ambassador of Mauritania, whose West African country with its half-Arab, half-African population typifies the crosscurrents. "All the groups - the black Americans, the Africans and the Arabs - have been going through a painful internal process of growth and organization. There was no time to look beyond the borders.Now the substantial cooperation of the past has been renewed."

Zahedi was selected for an honorary degree from Howard, according to Dr. Roger Estep, the vice president of development, "because the university respects his contributions to the city of Washington." Zahedi also serves on the 22-member International Sponsors Council, a fund-raising and development group of the university.

Iran has not contributed financially to Howard, according to the officials, but Iran has invited its president, James E. Check, for a visit. On the much-publicized junket to Iran last year with Elizabeth Taylor, two Howard officials were included. Zahedi has cited the presence of Iranian students - 550 have graduated and 80 are currently enrolled - as his main interest in the university.

C. Payne Lucas, the founder and director of Africare, said the Iranian support for the group grew out of a meeting he had with the Shah of Iran in Switzerland in 1972. "I approached him quite candidly becaause Iran had the oil money but also because of the historical connection with black Africa because of the Islamic religion," Lucas said. Africare has received "moral support," says Lucas, but never any money from Iran.

Asked if Western concern over some of the internal situations of the Middle East countries, such as violations of human rights, affects relationships with an organization like Africare, Lucas says, "we don't have a policy of asking a certain type of government for aid. As long as a government doesn't impose its philosophy on us, we can work together. The Iranian situation between the government and their students is not our bag. We wouldn't exercise a judgment on their internal policies."

Dr. Clovis Maksoud, a visiting professor at Georgetown University's Center for Contemporary Arab Studies which was given a $750,000 chair by Libya last week, raising questions about the alliance of politics and education doesn't feel the overtures are a conscious strategy. "I don't think this is a deliberate development because Arabs are interested in developing all segments of public opinion but with the segments of public opinion but with the black American community it's a little different. The Arabs feel that blacks having certain experiences, being dispossessed and discriminated against, will feel a sympathy toward them."

Can the alliance backfire, losing the black community some of its traditional ties, and financial resources, from the American Jewish community "I don't think displaying an interest in Arabs is anti-Israeli," says Diggs. "But that may be a consideration in some quarters, causing some people tomove cautiously.