WARSAW, JAN. 26 -- Yugoslavia backed away from civil war as the rebel republic of Croatia agreed early this morning to dismantle a reserve police force that the federal government had declared illegal.

The Yugoslav army had threatened to forcibly disarm the 15,000-man Croatian force. Both the federal army and the Croatian police, which had been placed on battle alert, were ordered today to resume normal duty.

"We were on the verge of civil war and bloodshed with catastrophic consequences," President Franjo Tudjman told the Croatian parliament after the all-night talks, held in Belgrade. "The army gave guarantees that it would not take steps against the sovereignty of Croatia and its legitimate leadership." In return, Tudjman said he had ordered the "immediate demobilization" of Croatia's reserve police.

The possibility of civil war in Yugoslavia had alarmed the U.S. government, which on Friday warned of "a significant danger of violence" and called for dialogue.

Tudjman, a former Yugoslav army general and a center-right nationalist who was elected last spring in Croatia's first free election since World War II, has led a rapid buildup of the republic's police reserve. His government has armed it with weapons purchased abroad, including AK-47 assault rifles and shoulder-fired anti-tank rockets.

Tudjman said today that those weapons were not part of the deal he made with the collective presidency of the Yugoslav federal government. "We did not say we are handing our weapons to anyone. The weapons remain at our disposal in case we need them," he said.

Croatia and its neighboring republic, Slovenia, are demanding a basic redefinition of Yugoslavia, a patchwork state of six republics, 24 million people, three religions, six languages, two alphabets and more than a dozen nationalities. The anti-Communist leaders of the two northwestern republics want complete sovereignty over their internal and external affairs. They insist that the country become a loose confederation akin to the European Community.

The key opponent to their plan is Serbia, the largest republic. Unlike most of Yugoslavia, Serbia continues to be run by a highly centralized, Communist-style government. The Yugoslav army, with an officer corps that is predominantly Serbian and strongly Communist, is Serbia's strong-arm ally in keeping the country together.

Today's agreement does not resolve long-simmering ethnic, religious and cultural differences between Serbia and Croatia. Those differences are heightened by ugly memories of World War II, when the Croatian Ustashi regime collaborated with the Nazis and killed tens of thousands of Serbs.

Tudjman held long talks Friday with Serbian President Slobodan Milosevic, a hard-line nationalist who is one of the two last Communist strongmen in Eastern Europe. The talks apparently did not go well. "It has been concluded that relations between Serbia and Croatia are at their lowest point since World War II," said a communique released afterward.

Milosevic has said he will only allow Yugoslavia to break apart if borders between the republics are moved so all Serbs scattered throughout Yugoslavia will live within Serbia. Since about a half-million Serbs live in Croatia, Milosevic's demand is viewed by Croats as a call to civil war.

After the agreement was announced today, about 30,000 Croats massed in the center of Zagreb, their capital, waving flags and singing patriotic songs.

"I have no illusions that we have just entered a paradise of security," Tudjman said today. "I appeal for great responsibility from people in power and politicians so that we do not play with the fate of our nation."

In a recent interview in Zagreb, one of Tudjman's senior political advisers explained that it is a characteristic of people living in the Balkan region to make threats of violence while always hoping that somehow violence can be averted.

"There is a tradition of oral aggression in the Balkans," said Slaven Letica, a philosopher and writer. "Someone will say, 'I am going to kill him. I am going to kill him.' But then they add, 'Please stop me before I kill him.' "

Letica added, however, that neither Croats nor Serbs have forgotten the bloodshed that occurred during World War II. These memories, he said, give Yugoslavia an enduring potential for violence.

"If the killing starts," he said, "nobody will be able to stop it."