LONDON (AP) _ President Vaclav Havel said Thursday that Czechoslovakia sold Libya 1,000 tons of Semtex explosive but will not be exporting any more of the virtually undetectable substance favored by terrorists.

Security experts say Semtex was used was the terrorist bombing of a Pan Am Boeing 747 over Lockerbie, Scotland, in December 1988, which killed 259 people on board the plane and 11 on the ground.

Semtex, made exclusively in Czechoslovakia, is an odorless, orange-yellow explosive that looks like children's play-dough. It can be molded into any shape and is 1,000 times more powerful than conventional explosives. It is almost undetectable to conventional anti-terrorist devices.

Havel, speaking through a translator at a news conference at the Czechoslovak Embassy on the second day of a three-day official visit, said, ''If you consider that it takes 200 grams (7 ounces) to blow up an aircraft, this means world terrorism has enough Semtex to last for 150 years.''

Havel did not say Czechoslovakia would stop making Semtex, but defended its production for peaceful use.

''This is an industrial explosive necessary for various industrial uses. It is not an explosive made especially for terrorists,'' he said. But, ''Now we want to mark Semtex so it will be detectable.''

''The past regime exported 1,000 tons to Libya. ... We ceased exporting this explosive some time ago.''

Havel, who became president last Dec. 29, gave no date or details.

But Jiri Novy, director of the plant northeast of Prague that makes Semtex, told The Associated Press that exports stopped in 1988.

He said Libya received ''over 900'' tons of the explosive in 1981 and that additional exports were made to Eastern Europe until 1988.

The British Foreign Office said formal exports of Semtex continued to Hungary and East Germany until 1989.

Britain's Press Association said Semtex has been the Irish Republican Army's chief weapon against British rule in Northern Ireland since late 1986, and was used in the September bombing of the Royal Marines School of Music in Kent, which killed 10 people.

The news agency, quoting unidentified security officials, said the explosive was smuggled into Ireland from Libya in 1985 and 1986.

Traces of a chemical constituent of Semtex were found in the wreckage of a UTA DC-10 that blew up over Niger in 1989, killing 170 people.

Czechoslovakia has long been a major arms manufacturer. It produces hand grenades, automatic rifles, tanks and armored personnel carriers.

Published reports say the export of such weapons and components accounted for up to one-half of Czechoslovakia's foreign-exchange earnings. The nation, suffering from a crumbling economy and strapped for hard currency, may find it difficult to stop the trade.

Under the hard-line Communist regime of Milos Jakes and Gustav Husak, Czechoslovakia found a market among nations too poor to afford expensive Western weapons or those denied access for political reasons.

Besides Libya, clients included Angola, South Yemen and the Palestine Liberation Organization.

Havel promised on Tuesday that Czechoslovakia's arms industry will no longer sell weapons to dictatorial or totalitarian regimes.

''We are studying reconversion of our military industry,'' he told a news conference in Paris, where he met with President Francois Mitterrand, before coming to London. ''Don't hold it against us if we continue to furnish arms for a little while to democratic governments.''

Havel met with business people and business organizations Thursday, exploring possible areas for economic cooperation.

He arrived Wednesday to a red-carpet welcome and luncheon at Buckingham Palace with Queen Elizabeth II, then had talks with Prime Minister Margaret Thatcher at her 10 Downing St. office and residence.

He said they discussed the future of Europe and German unification.

''I told her that the process of unification should be understood as a sort of engine propelling the unification of the whole of Europe,'' he told reporters.

Havel returns to Prague on Friday.