Sri Lanka said it foiled an attempt by Tamil separatists to assassinate President Junius R. Jayewardene this morning when they expected him to arrive at his office in the island nation's capital of Colombo.

The alleged plot against the 78-year-old Jayewardene was seen here as an attempt to sabotage current talks between the government and separatist Tamils seeking to carve an independent state out of the northern and eastern part of the island. The talks are aimed at ending the ethnic violence that has brought Sri Lanka to the brink of civil war.

Sri Lankan authorities blamed the Eelam Revolutionary Organization of Students, one of five Tamil separatist organizations meeting with government officials in Thimpu, the capital of the Himalayan kingdom of Bhutan. Eelam is the name of the state the Tamils would create.

In the southern Indian city of Madras, where many of the Tamil separatist organizations maintain headquarters, a spokesman for the student group denied any involvement.

"This is a trick by the Sri Lankan government to damage the negotiations," said spokesman Velupillai Balakumarau.

Sri Lankan authorities in Colombo said they arrested two members of the student group running away from a parked van containing more than 50 pounds of explosives set to go off at the time Jayewardene usually would be driving to his office. A third youth escaped, Sri Lankan police said.

Jayewardene, ill with the flu, has not gone to his office since Monday and had no plans to be there today, officials in Colombo said.

The government of Indian Prime Minister Rajiv Gandhi, which has been pressing the Tamils and Jayewardene to end the violence, condemned the assassination attempt and said India was not involved.

"Terrorism does not solve any problem," a spokesman for the Indian Ministry of External Affairs said here today.

Sri Lanka's Tamil minority, linked religiously and ethnically to residents of the southern Indian state of Tamil Nadu, charge that the largely Buddhist Sinhalese majority discriminates against Tamils.

In the Thimpu talks, the two groups are seeking a formula that preserves Tamil rights within Sri Lanka. The talks are the first between the government and separatists in nearly 10 years of sporadic violence.

There are no reliable reports on the progress of the talks, which started Monday and may last another week. One reason they are being held in Thimpu is to isolate the participants from political pressures.

Tamil separatists in Madras rejected today what they said was a Sri Lankan offer at Thimpu of district councils to handle local affairs for Tamils. A similar proposal had been rejected this spring by moderate Tamil politicians.