For the second time in three years, the District of Columbia has been caught in an international diplomatic crossfire that local officials see as a threat to the city's hard-won powers of self government.

The dispute, now headed for a potentially bruising fight on Capitol Hill, is over the location of chanceries, the offices of foreign embassies that traditionally have been clustered in fashionable inner-city residential neighborhoods. City officials want new chanceries put whenever possible into commercial areas.

Heeding assertions from the State Department that the District put needless roadblocks in the way of chancery-seeking governments, the House Foreign Affairs Committee has endorsed legislation that would strip all zoning power over chancery locations from the District government and give it to a federal body, the National Capital Planning Commission (NCPC). Federal representatives, including two from Congress, have eight of the commission's 12 votes.

One day last week, in a crowded congressional hearing room, residents chiefly from the Embassy Row area near Dupont Circle who oppose the change, sat mostly in silence, but occasionally applauded as points were made on their side of the issue at an unusual hearing by the House District Committee.

The District Committee's chairman, Rep. Ronald V. Dellums (D-Calif.), agreeing with Mayor Marion Barry and others that the State Department's drive is a threat to the city's six-year-old home rule powers, called his own hearing on the pending measure. He will convene a meeting tomorrow to decide whether to challenge the Foreign Affairs Committee measure when it reaches the House floor.

Among those attending the District Committee hearing was Elaine Dym of the Sheridan Kalorama Advisory Neighborhood Commission who sat grim-faced after complaining to reporters that her area's spokesman, attorney George Blow, had been barred from testifying along with all other citizen witnesses.

Dellums sought to defuse a potential controversy over his testimony blackout, saying he wanted to hear from District officials as the authentic spokesmen for the local citizenry.

The last time there was a head-on clash in Congress between foreign affairs and District self-government, international diplomacy won handily.

That was in December 1979, when Congress needed State Department pleas and voted, for the only time since District home rule began in 1975, to veto a law enacted by the D.C. City Council. If the council's measure had been allowed to stand, all future location of chanceries in low- and medium-density residential areas of the District would have been prohibited.

With that measure overturned, chanceries continued to be permitted under the congressionally enacted Fulbright Act of 1964 without restriction in higher-density (chiefly apartment) zones along with virtually all commerical areas. Under a section of the city's official comprehensive plan adopted by NCPC and the city's Zoning Commission, they also are permitted in some residential areas, such as Embassy Row, if a foreign government's plans are reviewed and approved by the D.C. Board of Zoning Adjustment.

Embassies, defined as the homes of the ambassadors but not their offices, are permitted in all residential zones.

Although Barry testified that city zoning officials have denied only two of 15 chancery applications -- from Iran, prior to the hostage crisis, and Bangladesh -- witnesses from the State Department insisted the city's procedures are too complex, too restrictive and too time-consuming.

Bangladesh, opposed by neighbors complaining that their neighborhood already is overburdened by chancery traffic and parking problems, was refused permission to occupy a three-story former residence at 2501 Massachusetts Ave. NW. The Asian nation currently occupies a chancery at 3421 Massachusetts Ave.

At last week's hearing, State Department lawyer James H. Michel testified that some countries needing chancery sites have not even been willing to apply to the city because they fear turndowns. Pressed for specific instances by Dellums, he pleaded diplomatic discretion in refusing to name names.

Streamlining the chancery-locating process "is important to securing fair and nondiscriminatory treatment for our own missions and personnel who are assigned abroad," Michel contended.

Some of the strongest testimony in defense of the city maintaining control over chancery locations came from Walter B. Lewis, chairman of the D.C. Zoning Commission.

"We are talking about the location of office buildings -- I think we should keep that foremost in our minds," he said, adding later: "It's a lousy precedent to suggest that a foreign country should be treated . . . different [from American citizens]. We are doing enough as it is."