Mohsen, a shopkeeper, stood on the edge of Tripoli's ceremonial Green Square and shook his head at the words from his ruler, Col. Moammar Gadhafi, blaring from a loudspeaker.

"He is telling us we must abandon everything foreign and be self-sufficient," he explained in broken Italian to a foreigner who struck up a conversation. "But if we rely on what we have here we will only be able to eat oil."

The occasion was Wednesday's speech by Gadhafi marking the 16th anniversary of the U.S. turnover to Libya of Wheelus Air Base outside the capital. The televised speech was full of defiance of the United States and its European allies and orders to the people to give up European clothes, food, drinks and other products.

"It is an opportunity to get rid of Europe," Gadhafi said. "It is we who back their crippled budgets."

But, as Mohsen and others in this arid North African nation of 3.5 million people know, it is Libya's budget that is crippled.

Libya today is undergoing the most severe economic crisis of Gadhafi's 17-year rule. It is a crisis that foreign analysts here say may do more to shake his government than the U.S. bombing raids on his major cities did last April.

Once awash in cash from its abundant oil reserves, Libya has had the rug pulled out from under it by the plummeting world price of oil. While in 1980 Libya earned $22 billion from its oil sales, this year, oil industry sources predicted, it will be lucky to earn $4 billion.

That income will not cover the nation's projected budget of $5 billion for 1986. It will not come close to paying off the $6 billion in international debts that Libya owes the Soviet Union, Italy, Turkey, South Korea and West Germany.

According to oil industry sources, Libya has increased its oil production to 1.4 million barrels a day this month, up from about 900,000 six months ago, to offset the slumping prices. But the prices continue to drop because of overproduction by members of the Organization of Petroleum Exporting Countries.

The departure at the end of this month of the five U.S. oil companies and six service companies that still extract oil in Libya may temporarily cause a drop in production. The oil companies are now operating under special licenses exempting them until June 30 from the trade embargo imposed by President Reagan in January and reportedly are trying to negotiate with Washington an extension of the deadline for departure.

But U.S. oil industry sources said Libya will be able to replace the American companies with other foreign experts and soon will be back to its current rate of production.

Not even the secret police or revolutionary committee cadres have been able to keep down the widespread grumbling, and on occasion riots, over chronic shortages of everything from toilet paper to soap to basic foods.

Libyans must line up to buy bread, meat (when it is available), fresh vegetables or fruit. By western estimates, almost half the shops in Tripoli are closed because they can no longer get the goods they need to sell. Even the shelves in the new government-owned supermarkets are barren of all but cans of Cypriot tomatoes, sacks of Cuban sugar and boxes of Chinese tea.

The shortages are the result of Gadhafi's efforts to cut his government's once lavish expenditures to cope with the fact Libya no longer has the money to pay for both guns and butter. The government has decided the people need guns more than butter, even though it is not certain if they even have the money to pay the Soviet Union the $5 billion they still owe for past arms purchases.

Western diplomats estimated that Libya has a small economic cushion to keep it from disaster in its foreign currency reserves, estimated at about $3 billion. But even these have been drawn down dangerously close to the $2.5 billion level that Libya considers the minimum it can tolerate.

The decreasing foreign currency reserves are going to make it harder in the near future for Gadhafi to relieve the growing disaffection of his subjects, as he has in the past, by importing food and other goods.

A major factor in his long rule has been that he has provided for his people. If he can no longer provide, common wisdom says, he will be in deep trouble.

Thus, for all his rhetoric about not wanting his citizens to eat "forbidden" European food, or wear European clothes or drink European drinks, Gadhafi recently bought a $75 million shipment of meat from Ireland and ordered a shipload of butter and cheese from Denmark.

"Just about the only food one can find, when one can find it, here is still imported," said the wife of one western diplomat. "There just isn't enough local food to keep the markets and shops open."

Thus the speculation here remains that as money gets tighter and imports of basic commodities continue to decrease, dissatisfaction with the government will continue to grow, and Gadhafi's government will be less and less credible.

"Then," said one diplomat, "any scenario is possible."