A U.S. military attache was accused today of taking photographs in a restricted Polish military zone and ordered out of the country, while U.S. officials countercharged that the diplomat and his wife were seriously mistreated last week when stopped by police.

The wife of the attache, Army Col. Frederick G. Myer Jr., allegedly was forced to strip during a search that followed the couple's apprehension and reported seizure of cameras and film.

[The State Department, charging "particularly outrageous" treatment of the colonel and his wife, announced that Polish military attache Col. Zygmunt Szymanski "must leave the United States promptly" in response.]

A Polish government spokesman, announcing the expulsion of Myer, the senior defense attache at the embassy, was spotted driving last Thursday with his wife Barbara in a new Volvo with Danish license plates through a restricted zone in the town of Przasnysz, about 65 miles north of Warsaw.

Spokesman Jerzy Urban said the couple, pulled over by police in the nearby town of Makow Mazowiecki, refused to get out of the car or identify themselves, tossed a blanket over their heads and appeared to be fiddling with camera equipment. Urban produced photographs of the couple taken by the police picturing Barbara Myer in the car hiding her face with her hands and the colonel flashing two V-for-victory signs through the front windshield.

Escorted to local police headquarters, the Myers left the car and were searched, Urban said. Police said they found two cameras with telephoto lenses, six rolls of exposed film and detailed maps of the region produced by the Defense Mapping Agency in Washington.

Urban showed journalists a photograph of what he said were military aerials. The spokesman said it was the only frame salvaged from the couple's attempt to expose their film.

The senior ranking diplomat at the U.S. Embassy, David Swartz, was summoned to the Foreign Ministry late this afternoon, told the colonel's activity was an abuse of diplomatic status and informed that Myer, who arrived in Warsaw last August, had been declared persona non grata and had 48 hours to leave.

In remarks to reporters, Urban alleged that the attache's action had represented a deliberate attempt to provoke an incident in order to aggravate further the already very poor state of U.S.-Polish relations.

In Washington, a State Department spokesman said a strong protest was issued to Polish authorities in Warsaw and Washington complaining about the length of time the Myers were held and charging that local authorities refused to allow a phone call to the embassy. Neither side specified how long the Myers were held.

According to Urban, the U.S. complaint also said that Barbara Myer had been "forced to undress and to perform degrading physical exercises." The State Department offered no immediate confirmation of having made this charge, apparently for lack of a waiver from her of Freedom of Information Act restrictions on release of personal data of private citizens.

As a sign of U.S. anger over the incident, Washington officials on Saturday called off U.S.-Polish talks on a new joint scientific and technical agreement, due to be held in Washington this week. [A later statement, announcing the expulsion of Col. Szymanski, also said the United States is putting off the return of a charge d'affaires to Warsaw.]

Urban denied that Barbara Myer had been ordered to undress or subjected to anything more than a search of her pockets and clothes by "female personnel."

"The strange suggestions concerning undignified treatment are meant only to divert attention from activities that violated diplomatic status and to blur the substance of this sorry affair," he declared. "It is appalling that such things can be said by the authorities of a country whose diplomats take their wives along on spying missions. She was used as a cover, knowing that in Poland women are treated with special reverence."

Urban claimed that the use of Danish license plates on the Volvo, which he said had not been listed as a diplomatic vehicle, was an attempt by Myer to camouflage his nationality and purpose.

The Americans say the car belongs to the U.S. Embassy and was brought Feb. 2 from Copenhagen to replace a car involved in an accident. The embassy is understood to have been in the process of obtaining diplomatic registration.

[The Pentagon said Col. Myer, 46, is a graduate of Bowdoin College with a master's in international relations from Boston University, proficient in Russian and German. He graduated from an area intelligence officer course in 1965 and military intelligence advanced course in 1969.]

The last expulsions of U.S. diplomats from Poland for spying came in 1982, when science attache John Zerolis and cultural attache Daniel Howard were ordered out, and third secretary Lesley Sternberg left after illegal leaflets were allegedly found in her car.

Today's spy episode coincides with a stepped-up effort by Polish authorities to focus public attention on alleged links between Poland's Solidarity opposition movement and U.S. intelligence agencies. The government announced last week that it had opened an investigation on charges of treason against Solidarity leaders in the West.

Urban did not tie the expulsion of Myer to the investigation of Solidarity, but some Poles saw the events as reflecting an intensified campaign by the government against opponents to offset the embarrassment of the conviction of four state security agents for the murder of a pro-Solidarity priest.

Some western diplomats had predicted privately as the trial was closing that it would be followed by a major espionage case to boost police morale and to buttress government claims that the Polish opposition is financed and steered from abroad.