After a weekend of mounting political and religious violence, the Turkish parliment today endorsed a government declaration of martial law throughout declaration of martial law throughout much of the country un an effort to heal "enmity and hatred."

Only one of the 538 deputies voted ageinst the move as troops imposed quiet on the battered city of Maras where 134 persons were killed and more than 1,000 others injured.

Martial law appeared to have a calming effect on the rest of Turkey that could provide a period of respite for this pivotal NATO ally to deal with its pressing social and economic difficluties.

In requesting parliamentary approval for martial law declared by Prime Minister Bulent Ecevit earlier today, Interior Minister Irfan Ozaydinly said the Maras rioting had sprung from "emnity and hatred that had accumulated over the years."

"We must heal this wound," he said. The weekend rioting at Mars, in eastern Turkey, capped an escalating cycle of terrorists attacks and fighting between rival Moslem sects that have claimed an estimated 1,000 lives this year.

The fighting involves the dominanat Sunni Moslems and minority Shiite Moslems known here as Alevis. It has political overtones since the Sunnis are by and large associated with rightest political factions while the Alevis are linked to leftist political groupings.

Political observers here say that their long-standing doctrinal dispute and rivalry are being exploited by political extremists.

Officials in Ecevit's left-of-center government have repeatedly hinted that legitimate political groups are behind much of the reightist-inspired violence that in turn brings relatiation from leftist groups.

The escalating violence since Ecevit took power last January appeared to reflect on increasing polarization of Turkish politics and growing public dissatisfaction with the declining economy. Turkey's unemployment rate stands at 20 percent while inflation is 70 percent.

The deeply religious right is upset by Ecevit's flirtation with the Soviet Union and his growing interest in neutralist policis.The left wants Turkey to cut its ties with Nato and the West and has used the recently repealed U.S. arms embargo against Turkey as an argument.

Apart from Turkeyhs drift toward neutralism, economic difficulties and sectarian violence have underscored the weakness of the Ankara government. Coupled with the chaos in neighboring Iran, Turkey's problems conceivably could threaten the socalled "northern tier" of strongly pro-Western states that blocks Soviet expansion ot the oil-rich Middle East.

Announcing the emergency in 11 eastern provinces, Ankara and Istanbul early today, Ecevit said the weekend riots constituted and "insurrection against the state."

The clashes, in which rightists and leftists supported by rival religious groups fought pitched gun battles and burned or looted more than 300 businesses and homes, occurred in Maras, famous for its resistance against the French occupation forces during the 1923 Turkish war of independence.

The violence flared when Sunni Moslems tried to stop funeral ceremonies for two leftist teachers shot desd in earlier incidents.

Three rightists were killed in the funeral clashes and the Sunnis, allegedly led by rightists militants from Ankara, retaliated by attacking homes of left-leaning Shiite Moslems. Army paratroopers and armored units had to be flown in to quell the distrubances.

Under martial law regulations, military courts will try "crimes against the state." Moreover legal restrictions were relaxed on searches of premises and individuals, and suspected violators can be held in dentention for a week without being brought to court.

Ecevit is said to have been extremely reluctant to impose martial law because of his championship of civil liberties and his wariness about military involvement in national political affairs.

Moreover, his decision created political problems for Ecevit, who faces a possible revolt from the left wing of his Republican People's Party on grounds that the conservative-oriented military would use the opportunity to stifle leftist and "progressive" factions.

Ecevit is likely to survive any such challenge unless the military's rule turns out to be heavy-handed.

The opposition has already indicated that it would seek a motion of censure over Ecevit's handling of the Maras riots.

Despite near unanious approval, there were angry scenes during the emergency parliamentary debate today as deputies shoved and pushed one another. Ecevit accused the rightist opposition-primarily the neofascits National Action Party-of instigating the Maras incidents in a attempt to topple his government.

Suleiman Demirel, leader of the principal opposition Justice Party, countered by accusing Ecevit of failing to take decisive action to stop sectarian clashes.

It was unclear at the moment whether the military leaders would seek to expand their authority in the current crisis. During the 1971-1973 period, the military ran the country through a series of caretaker prime ministers. At that time martial law as maintained in 11 provinces and its imposition was precipitated by internal unrest.

Ecevit, a social democrat, came to power with a pledge to restore law and order and liberalize Turkey's political life-policies that the Maras incidents and imposition of martial law seriously endanger.