Turkish Premier Suleyman Demirel said today that the U.S. arms embargo was partially responsible for Turkey's current economic crisis and he warned Greece not to try to take advantage of Turkey's difficulties.

Demirel spoke about Turkey's rapidly mounting economic difficulties for the second successive day as his coalition government was trying to draw up an emergency program of economic discipline to qualify Turkey for international credits.

A whopping increase in the country's balance-of-trade deficit and a sharp decline in foreign-exchange reserves have caused the Turks to fall behind on payments for imports and an interest on foreign loans. This is turn has prompted European and American bankers to deny Turkey more credits.

Speaking at a news conference. Demirel said the cutoff of U.S. military aid after the Turks invaded Cyprus in 1974 had contributed to Turkey's economic decline.

"To keep our defenses strong we have had to spend money on arms instead of spending our resources on the development," he said. He made a similar statement on television yesterday.

Turkey's inability to obtain foreign credits threatens to exacerbate the already alarming economic decline, marked by a 20 per cent inflation and more than 13 per cent unemployment. Moreover, since Demirel's return to power July 19. Turkey has been racked by violence that has cost 39 lives.

Today, four people died in a clash between squatters and police trying to tear down a shantytown on the outskirts of Istanbul.

Demirel's public pronouncements seem designed to ready the nation for an inevitable period of belt-tightening and to explain Turkey's present predicaments in terms of national security needs.

"We attach great importance to defense. It will remain our first priority at all times," he said.

The 51-year-old premier went on to caution against any aggression against Turkey, saying. "If anyone tries to do any harm to Turkey they will get pulverized."

Asked if the warning was meant primarily for Greece, Demirel replied: "I mean everyone."

Turkey and Greece, who are allies in NATO, narrowly avoided war over Cyprus in 1974. Another dispute that continues to simmer focuses on conflicting continental-shelf and air-space rights in the Aegean Sea, while lies between the two countries.

Demirel's statements on defense also gave credence to unconfirmed reports that the Turkish armed forces were insisting that the government hold on to what is left of Turkey's depleted foreign reserves in case new hostilities with Greece force Turkey to buy more arms.

Turkey's foreign-exchange and gold reserves have dwindled to $670 million because of increased arms expenditures, declining exports and reduced remittances from Turkish workers abroad because of the economic recession in Europe.

A delegation from the International all Monetary Fund is due in Ankara Monday to discuss the possibility of a loan. The Turks owe $1.9 billion in short-term loans to foreign banks, nearly one quarter of which is due by the end of this year.

Turkey's oil-import bill is in excess of $1 billion annually, and its trade deficit, for the first half of 1977 was $2.05 billion.

Demirel has been quoted as saying that a credit of about $600 million would be enough to see Turkey through the immediate crisis. But the IMF is reportedly reluctant to provide funds unless the Turks take long-over-due measures to stabilize their economy.

Senior ministers of Demirel's conservative three-party coalition have been meeting all week to try to work out a stabilization program that will satisfy the IMF and restore international bankers' faith in the Turkish economy. The package will probably include a devaluation of the Turkish lira and increases in the price of gasoline and other goods produced by state enterprises. A 100 per cent increase in liquor and cigarettes produced by the state monopoly Tekel has already been decreed.

Despite a 73 per cent increase during the past 12 months in Turkey's balance-of-trade deficit and the soaring inflation and unemployment, the Demirel government refused to acknowledge until its return to power that economic difficulties even existed.

One of Demirel's favorite campaign slogans was: "We must get used to speaking of trillions, not "billions" in respect to Turkey's economic growth.

Vice Premier Necmettin Erbakan toured the nation laying cornerstones for huge industrial projects that officials now privately admit there are no funds to complete.

Campaigning on a pledge to restore order - more than 200 people died in political and social violence during Demirel's two-year premiership - and stabalize Turkey's economy, opposition leader Bulent Ecevit won 214 of the 450 assembly seats in the June 5 election. But his moderately leftist Republican People's Party ruled for less than a month before the minority government was toppled in a vote of confidence July 3 by the combined forces of the former rightist coalition.

Demirel's Conservative Justice Party, Erbakan's pro-Moslem National Salavation Party, and the neofascist National Action Party then formed a government.