The Lebanese Army and Shiite Moslem militiamen battled for several hours today in the most serious fighting in Beirut since the government began reclaiming control of the city following the Israeli invasion into Lebanon a year ago.

Two Lebanese soldiers and three Shiites were reported killed, and a dozen from each side were wounded in the fighting, which erupted when troops moved into the old Jewish quarter of predominantly Moslem west Beirut to enforce a court order evicting refugee squatters who had taken over a former school. State-controlled television said 90 Moslems were arrested.

Late tonight, the Army appeared in full control in the area. But the violence cast doubt again on the ability of the Army, which is largely Christian, to gain acceptance by militant factions of Lebanon's Moslem majority in its efforts to impose its authority throughout the country.

Today's combat in the heart of Beirut, just west of the line separating the predominantly Christian east and the predominantly Moslem west, followed a confrontation between Lebanese Army reconnaissance patrols and angry Druze Moslem crowds in Alayh yesterday that left two Druze dead and 18 people wounded, among them 14 Lebanese soldiers.

The battle today involved tanks, rocket-propelled grenades, machine guns and sniper fire. At the height of the fighting, Army troops arrested eight journalists, including several Americans and British. Some of those arrested said they were blindfolded and beaten by Lebanese authorities before they were released.

A Lebanese Army communique issued after the day-long battles said a Lebanese police patrol went to a former Jewish school with a court order directing illegal occupants to vacate the premises.

Shiite Moslems have been using the building for prayers and religion classes, and the top floors have been occupied by squatters who came from the south during the 1975-76 civil war and the Israeli invasion. Many buildings in Beirut were taken over by refugees during those periods, and owners have been attempting to regain control of them.

Fathiyya Malak, 19, a Shiite from southern Lebanon who was entering the building for her weekly religion lesson, said that when Moslem men gathered to face the Army jeeps "the soldiers started shooting in the air to disperse the crowd, creating panic." The Moslems, believed to be from Amal, a paramilitary Shiite force, mobilized and some began hurling stones at the jeeps.

"The shooting started immediately, but I don't know where it started from as I started running away," Malak said.

Armored personnel carriers and tanks quickly surrounded the area. Armed Amal militiamen, faces covered by black hoods, took to the streets.

Army troops began searching and storming houses for suspects and arms after a rocket-propelled grenade was fired at an armored personnel carrier, wounding a soldier, local radio stations said. The Army said its soldiers confiscated large quantities of weapons and ammunition.

Today's tough measures by the Army, acting for the central government, are likely, in the view of observers, to undermine its acceptance among Moslem Shiites.

The Shiites are extremely sensitive about the issue of housing, especially since some fled their homes in Christian east Beirut during the civil war and now are afraid to return. Other Shiites from the south now have jobs in the capital and are reluctant to go back to their villages, in areas now under Israeli occupation.

The Lebanese government, entangled in the sticky task of securing the withdrawal of foreign troops from the country and resolving Christian-Druze friction in the mountains, has done little so far to alleviate the acute housing shortages in Beirut, mostly affecting low-income groups, especially the Shiites.

Shiite leader Nabih Berri called for a strike Saturday. He also called on Prime Minister Shafiq Wazzan, a Sunni Moslem, to resign.

Wazzan, however, said that "the government is simply applying the law. There are parties who are accustomed to standing against the state. I am following up the incident and dealing with it."

The Army has been given orders to retaliate whenever security is jeopardized, a military communique said. Defense Minister Issam Khoury stressed this determination in a statement today, while also expressing his regret for the day's bloody clashes.

Although the Army is controlled by Christians, Moslem Shiites were among the most ardent volunteers in a massive recruitment drive this year and many are now serving in it.

President Amin Gemayel, sensing dissatisfaction among Shiites, has made well-publicized gestures such as visiting their slums and ordering cleanup campaigns. But occasional arrests and house-to-house searches directed at terrorists and Palestinians in Shiite neighborhoods have hurt relations.

The Associated Press reported the following from Beirut:

Eight journalists--three Americans, two Britons and three Lebanese--were arrested by the Lebanese Army today while covering the fighting in west Beirut, and three of the foreigners charged that the soldiers slapped, punched or kicked them.

The foreigners said they were taken to a military tribunal where they were blindfolded, held for two hours in a cell and released after being questioned.

The Americans were photographer Don Mell, of Wilmington, Del., on assignment for The Associated Press; Time magazine photographer Robin Moyer, of New York City, and Vis-News cameraman Bob Deitz of Philadelphia. The Britons were Reuter correspondent Alan Philps and UPI-TN cameraman Ken Jobson.

Philps, Deitz, Jobson and three Lebanese journalists were arrested while watching the fighting between Army troops and Shiite Moslem militiamen near the war-shattered Holiday Inn. Mell and Moyer were seized at a telephone exchange near the hotel about an hour later.

Moyer said he was making a telephone call when a Lebanese soldier "screamed at me in Arabic . . . then gave me a karate chop in the neck. Then I was hit again in the kidneys before they forced us into a truck."

Philps said he was hit twice on the back of his neck before he was interrogated, and he saw Jobson "being beaten, punched to the floor and kicked."