The Lebanese government announced today that it would attempt to close down a string of militia-guarded private ports that have been skimming millions of pounds in lost customs revenue from the national treasury.

In an emergency Cabinet meeting focusing on Lebanon's growing economic crisis, the government also decided to seek reconstruction loans and grants from other Arab states and to introduce stricter controls on customs and tax collecting procedures.

Anticipating government moves to prop up the weakening pound, traders cashed in dollars today, bringing the value of the Lebanese currency to about 8.20 to the dollar at the day's close. It had risen to 9.40 on Saturday in frantic trading that was widely interpreted as a sign of dwindling public confidence in the ability of Christian and Moslem chieftains to agree on how to redistribute power among them.

After the session, President Amin Gemayel flew unexpectedly to Libya on what the government said was an official invitation from Libyan leader Muammar Qaddafi. Although no reason was given for the trip, some analysts speculated it may involve a bid for financial aid from the oil-rich state.

The way for a thaw in relations between Beirut and Tripoli presumably has been paved by Lebanon's improved relations with Syria. Both Syria and Libya, the two most influential hard-line Arab states, last year helped arm and finance the Moslem opposition to Gemayel's previous Cabinet during a period when Gemayel maintained strong ties with the United States.

The rise of private ports along Lebanon's Mediterranean coast has become one of the most prominent symbols of the central government's loss of control. Set up in 1976 after the start of Lebanon's civil war, these unofficial docks have been operated off-and-on either directly by various militia forces or under their protection. The militias exact taxes on goods unloaded.

Those levies are just a fraction of the duties charged at the official Beirut port; consequently, most merchants prefer to import through the illegal ports -- so much so that economic ministry officials were quoted in a local paper today as saying that virtually no basic goods passed through the Beirut port in September.

The loss of customs revenues -- in addition to the nonenforcement of income tax payments in Lebanon -- is blamed for the government's alarmingly large deficit. The size of the deficit has, in turn, undermined confidence in the Lebanese pound.

Many doubt that the government will be able to take over the lucrative East Beirut dock run by the Lebanese Forces, the militia arm of Gemayel's own Christian Phalange Party, unless the militia is assured that all other illegal ports in Lebanon will be shut down. A number of private ports operate currently from Syrian-controlled areas of northern Lebanon and Israeli-held areas of southern Lebanon. Druze leader Walid Jumblatt is building his own illegal dock in Khalde south of the capital. The Shiite movement Amal has announced plans to set up an unofficial port at Ouzai near Beirut.

Closing all these operations poses an awesome task. Nonetheless, Prime Minister Rashid Karami declared after today's Cabinet meeting that security branches had been instructed to ensure that they are turned over to the legitimate authorities. A similar effort by Gemayel last year was short-lived.

In another development, fighting erupted in Beirut's southern slums between what is believed to be rival factions of the Palestinian Liberation Organization. The shooting was reported to have begun in the Burj al Barajinah Palestinian refugee camp. Small arms fire spread to other neighborhoods during the day as the Lebanese Army moved to seal off the area and closed one of the main roads leading from the center of Beirut south to the international airport. The clash highlighted the return in recent months of hundreds of PLO guerrillas into Beirut camps, which they had been forced to leave after the 1982 Israeli invasion.