PANAMA CITY, JULY 27 -- Security forces armed with submachine guns and tear gas and backed by helicopters today launched a dawn raid on the house of a leading government critic and arrested him after a firefight that lasted more than two hours.

The attack on the house of retired colonel Roberto Diaz Herrera came in the opening hours of a two-day general strike that shut down most shops and offices in the capital and was reported to have done so in other cities. The strike is aimed at forcing the ouster of military strongman Gen. Manuel Antonio Noriega, who rules Panama behind the scenes.

Noriega cracked down hard on the country's growing opposition movement as his troops closed three opposition newspapers last night and raided Diaz Herrera's house here in a luxurious neighborhood where many of Noriega's leading opponents live. Members of the opposition National Civic Crusade said leaders of the organization went into hiding after the attack.

Troops launched the raid at about 6:30 a.m., assisted by at least two helicopters that hovered over the house firing tear gas. Diaz Herrera and a group of armed supporters resisted, engaging the security forces in a firefight that lasted more than two hours, according to residents of the neighborhood and foreign observers.

There were reports, denied by the military, that several persons were killed or wounded in the battle. Lawyers and friends of Diaz Herrera, who according to one unconfirmed report was wounded in the leg before his arrest, said they had not been allowed to see him and had no word of his whereabouts and condition.

According to a statement issued by Maj. Edgardo Lopez, the spokesman of the Panamanian Defense Forces, 45 persons who were inside Diaz Herrera's house were arrested after security forces went to the house to recover weapons and met resistance. Lopez claimed that the shooting lasted only seven minutes and that no one was killed or injured.

Lopez said later that all those arrested were being held in Modelo prison. He said the Defense Forces assaulted the house because it had been "turned into an open center of sedition," stocked with arms, ammunition and subversive literature, as well as documents on witchcraft and Hindu mysticism.

Lopez's version conflicted with the accounts of neighbors, who said the assault started around 6:30 a.m. and that shooting was still going on close to 9 a.m. Witnesses, who declined to be identified, said they saw at least two helicopter gunships flying around the house at rooftop level and firing tear gas into the residence. There were unconfirmed reports that the helicopters also strafed the mansion with machine-gun fire.

According to a ham radio operator, police communications reported two bodies on the lawn outside the house and four inside after the assault by 40 to 60 heavily armed riot troops, known as "Dobermans."

Moments before the assault, one neighborhood resident said, an officer shouted through a megaphone for Diaz Herrera to surrender. The colonel shouted back, "Tell Noriega to come get me himself," the resident said.

Police sealed off all streets leading to the house, denying access to journalists.

One witness said he saw a carload of unidentified detainees with bloody faces being driven away by troops brandishing submachine guns. Another resident of the neighborhood said Diaz Herrera appeared to be wounded as he was led away and driven toward a military barracks.

Diaz Herrera's lawyer, Alvin Weeden, and Archbishop Marcos Gregorio McGrath, who tried unsuccessfully to pass police roadblocks during the attack, said they could not confirm reports of deaths in the battle, but both said they saw several wounded persons being driven away from the scene.

Weeden said he planned to file a criminal complaint against Noriega before the Supreme Court Tuesday, because of what he called the "savage" detention after the attack of Diaz Herrera's family, including four children, aged 5 to 16.

Diaz Herrera has been a thorn in Noriega's side since last month. The colonel was forced to retire June 1 from his post as Noriega's second-in-command. He then began publicly accusing Noriega of masterminding two political assassinations, rigging the 1984 presidential election and using his position to amass fabulous wealth.

Government officials charge -- and diplomatic sources agree -- that Diaz Herrera is mentally unstable, but his charges triggered anti- and pro-Noriega demonstrations, sometimes violent, that have wracked the country since June 9.

The Reagan administration has quietly suspended military and economic aid to Panama and downgraded its contacts with Noriega. The U.S. actions, none of which have been publicly announced but were reported last week, reflect a growing belief at high levels of the administration that Noriega's domination of Panama is both unacceptable and under greater pressure than at any time since he took power as commander of the Defense Forces in August 1983.

Diaz Herrera apparently was aware of plans to attack his house, according to a communique he issued last night from what he called his "headquarters of dignity." In the statement he said that in the face of government plans to attack him in the early morning, "I have prepared our battle plan."

While Diaz Herrera's charges have embarrassed Noriega and his lieutenants, diplomatic sources said the military leadership appeared to be more concerned about the potential impact of an open letter from Noriega's predecessor calling on him to resign.

The public appeal by Gen. Ruben Dario Paredes, who retired in 1983 as Panama's military chief and de facto ruler, was published July 24 in the opposition newspaper, La Prensa. Paredes warned that unless Noriega stepped down, the country would face "greater violence, destruction and bloodshed."

Addressing Noriega, the open letter said, "There is no space left for you to maneuver in, and tomorrow may be too late."

Late last night, security forces went to the offices of La Prensa and two other newspapers, Extra and El Siglo, and ordered them not to publish today, citing a national security decree. It was not immediately known how long the ban would remain in force.

{Weeden, Diaz Herrera's lawyer, told Reuter that Noriega ordered the shutdown of opposition newspapers so they could carry out the attack on his client's house. "They want to spread terror so they can put an end to the strike and everything else," he said.}

The shutdown prevented the papers from reporting the death of a 24-year-old man who was shot by a member of the Defense Forces in the resort town of El Valle de Anton early Sunday. Noriega-controlled newspapers said the man, Eduardo Carrera, was killed when he tried to attack two Defense Forces members.

However, according to accounts from opposition sources, the youth was shot to death when he shouted, "Down with Noriega," at the soldiers.

Accounts of the shooting and the newspaper closures were censored from a summary broadcast by a local radio station of a Voice of America news program.

Apart from the attack on Diaz Herrera's house, the streets of this capital appeared quiet today as most Panamanians evidently obeyed a call by the National Civic Crusade, an anti-Noriega opposition group, for a general strike.

Diplomatic sources said the strike appeared to be about 80 percent successful in Panama City and up to 95 percent successful in Colon. The Panama Canal was reported operating normally, although some administration personnel of the Panama Canal Commission joined the strike.

In the afternoon, supporters of Noriega and of the government of President Eric Arturo Delvalle, considered largely a figurehead, staged a horn-honking motorcade through the city in an effort to counter the opposition activities. More than 900 cars joined the motorcade, which wound through the city's business district.