Chancellor Helmut Kohl, winding up a Moscow visit by announcing that the Soviet Union had agreed to release all its political prisoners by the end of the year, appeared to have caught his hosts off guard.

Speaking at a news conference after three days of talks in Moscow, the West German leader said he had received an assurance from Soviet officials that they were ready to release all people considered by the West to be political prisoners.But Soviet Foreign Ministry spokesman Gennady Gerasimov declined to confirm that any such promise had been made.

He said the issue was not on the agenda of Kohl's talks "although it may have been touched upon." He said it was for European security talks in Vienna to resolve the problem.

"I did not say anyone was wrong," Gerasimov retorted when asked if was was contradicting Kohl's statement. "If the West German side has been informed about events in Vienna, then I am not going to contradict that."

In Washington, the United States welcomed the news of a release of political prisoners, but a State Department spokesman said an East-West dispute over what constitutes a political prisoner could still be a problem.

Kohl declined to say how many prisoners were involved. A Soviet Foreign Ministry official said recently there were about a dozen people convicted for "anti-Soviet agitation and propaganda and "defaming the Soviet state."

These two charges are most frequently used against dissidents. Western human rights activists say 250-300 people are currently imprisoned under these charges.

It was not clear if the amnesty would include people said by the West to be held against their will in Soviet psychiatric hospitals.

Kohl said in a West German television interview on Wednesday: "What I said about the prisoners today is not really new, for (Soviet) Foreign Minister (Eduard) Shevardnadze already talked about it on other occasions, and so it played a role in our talks.

"When it happens (the release of prisoners), and I have no reason to doubt it, then it will be a great advance for human rights."

At the Moscow news conference, the West German leader said progress had been made in ironing out one thorny problem in relations with Moscow - the inclusion of West Berlin in East-West agreements.