President Reagan today condemned the bombing of TWA Flight 840 as a "barbaric action of wanton international terrorism" against "innocent air travelers" and promised to seek out and prosecute those responsible.

In a statement read here by spokesman Larry Speakes while Reagan vacationed at his nearby ranch, the president said, "Neither the United States or the world community can cease our efforts to bring to justice those who perpetrate and support such actions."

The statement followed a day of caution by administration officials, who refrained Wednesday from publicly describing the bombing as an act of terrorism.

Speakes said today the blast appeared to be caused by a terrorist who placed an explosive device on the plane, killing four Americans and injuring others.

Although a Palestinian group called the Ezzedine Kassam unit of the Arab Revolutionary Cells has claimed responsibility, he said, "We have not ruled out any terrorist group, organization, movement or individual as a potential perpetrator."

Nor has the administration ruled out specific countries, he said. However, Speakes and other officials did not pin the blame immediately on Libya, which has vowed reprisals against Americans following last week's military confrontation in the Gulf of Sidra.

Speakes said the administration would not speculate on who carried out the attack until it has more information.

He said Federal Aviation Administration explosive experts were dispatched to Rome and Athens and the Federal Bureau of Investigation has been ordered to help local authorities in investigating the incident.

Reagan also intends to send personal letters to relatives of those who were killed, Speakes said.

The spokesman said U.S. officials are still doubtful that Libyan leader Muammar Qaddafi ordered the attack, but he cautioned that this was based on very preliminary information. He suggested that the United States did not have previous information on the Lebanese woman who reportedly carried the explosive on board when the plane flew from Cairo to Athens. Reports have indicated the woman had a known background of association with terrorist groups.

Speakes said the United States does not issue travel advisories on the basis of a potential for terrorism in a region.

"Terrorism is a deplorable reality of which we are all aware," he said. "The random and unpredictable nature of terrorist acts, however, makes it impossible to predict with any accuracy if, when or where threats by various groups will be carried out."

He said that "travel is never without risk" but "we believe that the American traveling public is well aware of terrorist acts and the threats made by a variety of groups against American interests and that they will take these and other relevant information into consideration."

Reagan continued to work around his ranch today, chopping wood and getting briefings on the terrorist attack from deputy national security adviser Donald Fortier.