Marxist officers in Sri Lanka's Army stirred up the ethnic conflict that led to the island republic's worst communal violence since independence, and then joined in it in an attempt to stage a military coup, President Junius R. Jayewardene has charged.

Jayewardene, interviewed at his home last week, said that on Tuesday he received "typewritten evidence," which he plans to release soon, showing that Army officers loyal to the Marxist-Leninist People's Liberation Front planned five stages of civil disturbances designed to lead to an overthrow of his government by the military and national police.

He said he has no "direct evidence" that a foreign power was involved in the coup attempt and added, "It's a very serious thing to point a finger. If we do get direct evidence, we certainly will do so."

Colombo's state-controlled morning newspaper, The Sun, reported in an editorial last week that diplomatic personnel of the Soviet and East German embassies here were under investigation for alleged involvement in instigating the violence.

Jayewardene said three Marxist-oriented political parties, in collaboration with the left-wing military officers, successfully exploited centuries of tension and distrust between the Buddhist Sinhalese, who form 73 percent of the country's 15 million population, and the Hindu Tamils, who make up 20 percent, to cause violence as a cover for a takeover of his government.

Violent clashes between Sinhalese and Tamils began July 24 after the ambush slaying of 13 Sinhalese soldiers near the Tamil town of Jaffna. Rioting soon spread throughout the country and to the capital, where communal violence has left charred buildings and led the government to impose a curfew. The official death toll is 267, mostly Tamils, but the actual toll is believed to be much higher. The violence is the worst of its kind since Sri Lanka, known as Ceylon until 1972, gained independence from Britain in 1948.

When asked why he waited five days after the outbreak of violence before making a televised appeal for a return to order, Jayewardene replied, "In addition to the Sinhalese-Tamil racial conflict there was a political motive. Who would have listened to what I said? I might as well have asked George Washington not to start his war of independence or revolution. You people think it is a communal riot. It is not. It is a revolution, and we have to adopt counterrevolutionary methods."

As for the Tamil Tigers separatist guerrilla movement in the Northern and Eastern provinces of Sri Lanka, Jayewardene said, "I think we can eradicate them. They did so in Malaysia and Burma." The Tamil Tiger guerrillas are the radical arm of the Tamil separatist movement seeking to establish a separate nation for Sri Lanka's 3.5 million Tamils in the northern provinces. Estimates of their membership range from under 200 to more than 1,000 guerrillas.

Jaywerdene said some government soldiers loyal to the Marxist parties had encouraged and participated in the violence. He said that leftist soldiers acting as provocateurs had been seen July 24 at the Colombo site of a planned mass burial for the 13 Sinhalese soldiers who had been ambushed in Jaffna the previous day. The funeral ceremony attracted a large and emotional Sinhalese crowd before the bodies were hastily removed, and attacks on Tamil neighborhoods in the capital began shortly afterward.

Jayewardene said his evidence of a leftist coup attempt was based on information obtained from People's Liberation Front informers, adding, "I'll be making all that public in time."

Jayewardene said the leftist plotters used the ambush to launch the first phase of a revolution by fanning the hatred between the indigenous Sinhalese and the Tamils. About half of the country's Tamils trace their roots here back two millennia and the rest are descendants of people taken from India in the early 19th century to work on tea plantations owned by a succession of European colonialists.

The president said the second and third stages of the revolution, which did not succeed, were designed to incite violence between Sinhalese and the small Moslem minority and between Buddhists and Christians. "If they had succeeded, there would have been a fairly general conflagration," Jayewardene said.

Anticipating stringent around-the-clock curfews and shortages of food, the left-wing plotters then intended to incite food riots to add to the confusion, Jayewardene said. The last stage, he said, was to be a takeover of the government by "dissidents" in the Army and national police.

In addition to the People's Liberation Front, which in 1971 attempted to oust the government of Sirimavo Bandaranaike and whose leaders were released from prison by Jayewardene in 1977, the plotters included members of the pro-Moscow Sri Lanka Communist Party and a small Trotskyist party, the New Equal Society Party, all of which Jayewardene banned last week, the president said. In addition, he said, communist members of Bandaranaike's Sri Lanka Freedom Party, which has not been banned, were involved.

Jayewardene said he also had information that the person who threw a bomb from a rooftop in central Colombo on July 29, triggering violence that left at least 33 persons dead, was not a Tamil Tiger but a member of the People's Liberation Front. Official government spokesmen had blamed the attack on the Tigers.

Jayewardene said he no longer feared a takeover by radical elements in the Army, adding, "That time has passed. You can't take over a government unless you have the people with you. We haven't lost an election in six years."

Appearing relaxed and confident as he sat in his living room dressed in a sport shirt and wearing sandals, Jayewardene said he was still prepared to make conciliatory gestures to any of Sri Lanka's Tamils who abandon the demand for a separate state in the Northern and Eastern provinces.

In addition to invoking emergency security regulations since communal violence began, Jayewardene also drafted a constitutional amendment, unanimously adopted Friday by the parliament that his United National Party controls, which effectively stripped the Tamils of representation by proscribing any parties that advocate separatism and banning any public discussion, either inside Sri Lanka or abroad, of Tamil independence. Violators can be stripped of all their civil rights, according to the measure.

Jayewardene, who in 1977 rewrote the constitution and elevated himself from the post of prime minister to an executive presidency, admitted that his preoccupation with partisan political activity in the last nine months may have diverted attention from his efforts to grant Tamils more autonomy. In addition to campaigning for election, Jayewardene, who was elected last October to a six-year term, campaigned heavily in a national referendum in December that extended the term of his parliament to six years, and in by-elections in May.

Jayewardene admitted that implementation of home rule reforms and measures to reduce discrimination against Tamils and broaden the use of the Tamil language "might have been done a little quicker, but not much quicker." He said "the officials were also busy with the elections."

Tamils have blamed much of the increased violence by the separatist guerrillas on frustration over the government's failure to implement promised reforms, coupled with impatience over the Tamil United Liberation Front's activity as the moderating force between the Tigers and the government.

"The front was prepared to wait, but the Tigers wouldn't let them," Jayewardene said. But he added, "The negotiating process will continue. We are more interested in the Tamil people than the Tamil party that represents them is. Maybe we can represent them."

Jayewardene rejected the notion that by effectively banning the Tamil party, Sri Lanka's largest opposition party with 17 members in the 168-seat parliament, he had removed the only moderate Tamil voice left between the government and the radical Tigers, thereby assuring renewed terrorism.

"The front would be a moderate voice if the Tigers were not there. Until the Tigers' [movement] is extirpated, nothing can happen. They will destroy the moderates," Jayewardene said.

He added, "I feel nothing can be done unless we destroy the terrorists or they give up."