The National Rifle Association pulled its display booth out of Expo '77 at Capital Center yesterday after exhibition officials told them to remove provocative opposing gun control posters or withdraw from the "family fun" festival.

At issue were an oversized facsimile of a Colt handgun and two large posters about three by four feet.

One poster said: "Gun permits, registration and confiscation are anathema to freedom and should be resisted by every citizen at every level of government through every available legal means." The other, a quote from Sen. James A. McClure (R-Idaho), said in part: "I can't underscore too strongly the reality of the threat to gun ownership."

"It is rather painful that this kind of thing happens on the Fourth of July weekend," an NRA spokesman commented yesterday.

The withdrawal apparently was prompted by complaints from an antihandgun coalition which was told in an inquiry before the exhibition that their activities were too "political" for the family event, according to coalition spokesman Sam Fields.

Capital Centre and Bruce Walter and Associates of Washington are promoting the 11-day commercial Expo '77, which is billed as a "mini world's fair." It began Thursday with 30 exhibits, arts and crafts demonstrations, a carnival midway and entertainment by Pat Boone and others. The NRA booth stood among a Smithsonian Institution ecology display, a mass people mover system by Westinghouse, a home heated by solar energy and National CancerInstitute advisories on cancer diagnosis and treatment.

"We had an agreement with the NRA on what would be distributed and displayed." Capital Center officials said in a statement. "When it was directed to their attention that they didn't abide by the agreement, we requested they remove those displays and brochures."

But James O. E. Norell, director of communications for the NRA's Institute for Legislative Action, claimed that his organization was not aware of any restrictions on display contents.

"Had we known they would want to review our booth and our literature," he said, "we would not have done this at all."

"It's a free country." Norell added, "and one of the reasons that we're interested in this is the free exchange of ideas. If someone next to us wanted a booth on the opposite theme, we'd welcome that."

In this case, however, Norell said they decided to remove the booths rather than argue the point.

The NRA's difficulties apparently began three weeks ago when the National Coalition ot Ban Handguns complained to Capital Centre owner ABe Pollin that the NRA booth would contain "considerable . . . provocative political material devoted to proliferating America's number one murder weapon, handguns."

"It would be unfortunate if such a positive program as Expo '77 was turned into a political football by the NRA." Michael K. Beard, the coalition's executive director, wrote Pollin.