Yugoslavia's revolution was one day old and Vojislav Kostunica, the man who would be president, was trying to consolidate power from his new quarters in the cavernous Palace of the Federation in Belgrade. Suddenly several army jeeps pulled up outside.

Gen. Nebojsa Pavkovic, a longtime friend and supporter of President Slobodan Milosevic, faced the opposition leader. Would Kostunica come with him to meet Milosevic? Kostunica coolly agreed, and was driven off into the night--without aides--to meet the man who had tried everything to block his rise to power.

At a presidential villa on Uzicka Street, the two men shook hands; they had never met before. "I am Vojislav Kostunica," said the visitor. For the next 30 minutes, alone, they argued. Milosevic refused to acknowledge he'd lost in the voting Sept. 24. But Kostunica held an ace: Yugoslavia's constitutional court had just named him the victor.

"I have not received that information," Milosevic said.

With that, Milosevic's resistance abruptly vanished, and the conversation veered in a bizarre direction. He asked Kostunica to walk with him around the villa grounds, where he pointed out ongoing repairs that Kostunica would have to complete. In particular, he mentioned, the plumbing did not work.

The fall of Slobodan Milosevic, nemesis of the West and the last major political leader in Eastern Europe surviving the Cold War, was both long in coming and extremely sudden at the end. Defying predictions of civil war, it turned out to be almost bloodless.

But the endgame on the streets was not only a spontaneous revolt of an inflamed people. It was the culmination of a brilliant opposition campaign that systematically won over key leaders of the police and army so that by the time of the meeting in the villa on Uzicka Street, Milosevic was isolated and his power broken.

Interviews with more than 30 well-placed people in the opposition movement and the former government show that from the start, Milosevic's control of his security forces was at risk. A majority of army members, weary of years of ethnic war under Milosevic, voted for Kostunica, and when the crunch came on the streets of Belgrade, the army and police defied orders to use tanks and helicopters against the crowds.

As insurance, the opposition had organized a 1,000-man militia of its own.

The army also played a key role in convincing an increasingly incredulous Milosevi that his time had passed. Gen. Pavkovic, who picked up Kostunica to take him to the meeting, had brought a written statement that the army recognized his victory.

Milosevic began his campaign this summer genuinely believing he could win the election. When he lost it, he believed he could steal it. And when he couldn't steal it, he believed--finally and desperately--that the police and the army would crush the people to keep him in power.

He was wrong on all counts.

Major Miscalculations

Shortly before calling the election, Milosevic's top aides were giving him a rosy picture of Yugoslavia's economic recovery, saying that citizens were experiencing few shortages and that reconstruction of bridges, roads and factories damaged in NATO's 1999 bombing campaign against Yugoslavia was going well.

"I went to see him in May, and everyone was telling him that we had enough oil, enough manure" and other essential commodities, said Radoman Bozovic, then the head of Genex Corp., one of the nation's largest companies. "I told him it was hardly true and the people around him were deceiving him." Bozovic was not invited back.

Milosevic's top aides, including Gorica Gajevic, general secretary of the ruling Socialist Party, were advising him that he was certain to win in the first round of an election. One of the few discordant notes was struck by Zoran Lilic, the party's vice president, who said he advised Milosevic in July that "his position was very, very bad" and that any election would be "an adventure."

Milosevic "reacted by saying that my fears are not supported by any argument, and that people appreciate the patriotic reconstruction of the country," Lilic said, adding that this type of defensive reply explained why "most people refuse to confront him on any issue." Lilic resigned from the party in frustration in August.

When independent polls in August showed that Kostunica was far ahead, Milosevic's loyal advisers told him they were Western-financed distortions. But the magnitude of the party leadership's miscalculation was clear within two hours of the polls closing on Sept. 24, said a top party official. Vote tallies from across the country were fed that night into a computer at the Socialist Party's Belgrade headquarters, and the fact that Kostunica had beaten Milosevic "by a large margin" was apparent to everyone, the official said.

Of particular anguish to the party leadership was the overwhelming support for Kostunica among military draftees, prison employees and certain police units, who had cast ballots for the opposition even though voting took place with little privacy in barracks.

When members of the country's federal election commission began to open the tallies from these groups on the first floor of the parliament building that night, several Socialist Party representatives suddenly said they were too tired to continue and quickly left the room.

Ten minutes later, they returned with security guards, said Biljana Borovic, who was present as a delegate of the Serbian Renewal Movement party. All opposition party members were told to leave the building. A victory party planned for that evening at the headquarters of the Yugoslav United Left Party, chaired by Milosevic's wife, Mirjana Markovic, was abruptly canceled.

"It turned out that people did not appreciate so much the rebuilding of their country," said Ivica Dacic, a Socialist Party executive board member. "Considering all the bad things that were done to us, it's no surprise we lost the election. In fact, I wonder how we ever remained in power for 10 years."

Organized Opposition

After the election commission, run by 76-year-old Borivoje Vukicevic, a Milosevic family friend from his home town of Pozarevac, declared that Kostunica had failed to cross a 50 percent threshold for a first-round victory, the 18-party opposition coalition countered with street demonstrations all over the country and a general strike.

The protests were aimed not so much at Milosevic as the police and the army. "Our strategy was to use those days to . . . convince them the people were against Milosevic" and that force should not be used, said Kostunica's top strategist, Democratic Party leader Zoran Djindjic.

But in case things did get violent, the opposition took the precaution of organizing its own armed force. By the time planning began for a climactic rally in Belgrade on Thursday, Oct. 5, opposition leaders said, the Kostunica camp had recruited roughly a thousand military veterans, including former members of the army's famed 63rd Parachute Brigade, the government's special anti-terrorist units, and paramilitaries. They were equipped with automatic rifles, pistols and anti-tank weapons.

On Wednesday, several opposition leaders met secretly with 20 of these veterans at a factory on the outskirts of Belgrade. Milosevic's police had only a few days earlier raided the site in an unsuccessful search for weapons. "We were not so stupid," said one leader; the arsenal had been dispersed to other sites.

Opposition leaders and security units traveled in secret to Nis, Novi Sad, Cacak and other major cities, where they presided over rallies early Thursday morning. In buses, tractors and cars, they then converged en masse on Belgrade, with the security units--as well as members of a boxing club--shoving aside policemen at roadblocks along the way.

While the crowd assembled in downtown Belgrade, three members of the student protest movement Otpor were assigned to listen to police transmissions on hand-held Motorola radios; as the demonstration progressed, they started broadcasting false calls for police assistance at distant sites.

"This kind of action cannot be planned to the last," said Vuk Obradovic, a key opposition leader and former general who after a rapid rise left the army in 1992 because of frustration over the wars in Bosnia and Croatia. "It had to be a subtle combination of spontaneity, which relies on the creativity of every man, and on other hand, a good organization in the key actions."

Army, Police Defy Orders

With the streets of Belgrade teeming, "the army was under intense pressure to engage," said Obradovic.

According to Momcilo Perisic, a former army chief of staff fired by Milosevic in 1998, and other sources, the president had by now decided to use force. The sources said Milosevic was holed up at a presidential hunting lodge in the village of Garesnica in eastern Yugoslavia. There he picked up the phone and ordered Pavkovic to put tanks on the streets. He also gave orders to shoot protesters who were storming key buildings, such as Radio Television Serbia, according to Perisic, who said he had been told that by senior army officers.

Milosevic was also on the phone with Vlajko Stojiljkovic, interior minister of Serbia, Yugoslavia's dominant republic, who controlled tens of thousands of police. Stojiljkovic ordered police to use several helicopters that were circling over a massive crowd in front of the federal parliament to drop tear gas and other chemicals, according to five opposition leaders who said they heard about the orders from sources in the army and police.

By their account, Stojiljkovic also ordered the police to disable two broadcast centers that opposition supporters seized that afternoon, including the downtown Belgrade offices of Radio Television Studio B. He suggested they attack them from the air by rockets or bombs if necessary.

But each time, the army and the police refused.

"That was the first moment that Milosevic realized how long he had been living an illusion," said Perisic, who heads one of the 18 parties that backed Kostunica. "When the army refused to obey his orders, when the police units refused to obey his orders, he was in shock."

The stand-down didn't happen by accident. For days, Perisic, Obradovic and Djindjic had been in touch with senior officers in the police and army, telling them that the opposition would use only nonviolent means against Milosevic. They implored the police and army to remain neutral.

"We will oust him in a democratic manner, but do not act as his bodyguards; do not stab us in the back," Obradovic told them. In return, they reassured the army general staff they would not attack its headquarters. In the army, in particular, they had a ready audience, partly because Perisic and Obradovic are widely respected. The opposition nonetheless put barracks under surveillance by student activists and others.

As it turned out, they had little to fear. Pavkovic got virtually no support when he called barracks around the country to try to mobilize troops to squash the resistance, according to two former senior army officers and Dusan Mihailovic, an opposition leader who has long been a mediator between Milosevic's party and its opponents.

Some senior officers refused to take Pavkovic's calls and confined their men to barracks. The commander of the country's military academy said his cadets were unavailable; the head of the army's large barracks in Valjevo said his troops would never fire at fellow citizens.

At one point, members of the crack Red Beret special forces unit, code-named "Forces of Brazil," were ordered to provide "backup" at the state-run television station, where 50 policemen had allegedly been taken hostage and were being killed by a mob. But when the soldiers arrived from the suburb of Batajnica, they found no such conflict and took off their gas masks.

"What backup? They are kissing with the people," one of the policemen inside said of the troops, in a transmission monitored by Otpor.

"The character of the army is such that anyone who tries to misuse it against our own people cannot be successful," said Perisic.

By about noon, Pavkovic informed Milosevic by phone that he would not--or could not--act, according to opposition and ex-army sources. That afternoon, in another phone call, Defense Minister Dragolub Ojdanic assured Obradovic through an intermediary that the army would remain "still." Obradovic also spoke to senior police officers, some of whom visited his offices in central Belgrade, to report that the police would not attack the protesters.

About 10 p.m., a mob of several thousand people started throwing stones at the Belgrade headquarters of Milosevic's party; it then pushed through the front door. Party executive board member Dacic was watching from a window upstairs. He tried to get police to intervene, but without success; he and his colleagues subsequently ran out the back door.

"There was a breakdown in the chain of command," Dacic explained. "You could call the police for anything and they wouldn't come. The police simply weren't functioning."

Russia's Role

On Friday morning, Kostunica's staff maneuvered furiously to gain access to offices at the Federation Palace, where all presidents before Milosevic had worked. But they needed the critical approval of the building's protocol chief, a Milosevic appointee who wavered nervously for an hour before extending the invitation.

The first official guest was Russian Foreign Minister Igor Ivanov, whose government, long friendly with Milosevic, had decided it was time to deal with Kostunica.

During their meeting, Kostunica laid out a series of demands for Ivanov to carry to Milosevic, including his insistence on an immediate vote recount under international supervision, leading to a formal transfer of power. But Ivanov urged that Milosevic be allowed a continued political role.

Then Ivanov went to meet Milosevic, who had come to Belgrade in an army helicopter. At his residence, the two sat on white couches at right angles to each other. But there was no warmth between the men, who talked for about 40 minutes. Ivanov later described a stoic Milosevic: He "is a skilled politician and he knows how to conceal his feelings and mood."

Ivanov also said at a news conference at the Russian Embassy that "as leader of the largest political party in Serbia, he intends to continue playing an important political role in the life of the country." Many of Kostunica's aides were incensed by this remark, and by the Russians' long reluctance to support Kostunica's election victory claim.

"It was a silly statement that had a terrible effect in this office," said Vladeta Jankovic, vice president of Kostunica's political party. "We don't feel we owe anything to Moscow now."

A Meeting, a Concession

Shortly after Ivanov's Oct. 6 meeting, Gen. Pavkovic telephoned a friend at the Beta news agency and asked him to reach Kostunica's office. Pavkovic's goal was to broker the first direct meeting between Milosevic and Kostunica, so they could work out a transition arrangement and preserve order, according to several sources close to Kostunica.

There were only two problems: Milosevic still refused to concede defeat, and he was fearful of moving around in public.

But Pavkovic decided to proceed anyway and to bring Kostunica to Milosevic, in that convoy of army jeeps. The opposition leader's aides felt dread at the thought of their boss going off by himself with a longtime Milosevic ally. In fact there was no danger--Pavkovic had with him a formal peace offering, a written pledge that the army recognized Kostunica's victory and would act legally.

In the meeting at the villa, Milosevic opened the bidding, according to multiple accounts by people close to Kostunica. No matter what the two men decided, he said, constitutional amendments he had orchestrated this summer allowed him to remain in office until July 2001. Kostunica said this was out of the question; he would have to resign immediately.

Milosevic responded that Kostunica had not yet won more than half the presidential vote. But Kostunica cited the decision of the constitutional court, which had certified his victory in writing that morning. Its decision was an abrupt turnaround from an earlier declaration that the election should be annulled because of irregularities.

"I have not received that information," Milosevic replied, then quickly conceded.

During the tour of the villa grounds, Kostunica, who lives in an apartment in central Belgrade, said he had no intention of moving into Milosevic's grand house. At that, Milosevic became defensive, saying he had done so only for security reasons.

Milosevic became expansive, suggesting that the election had in fact relieved him of a big burden, saying that he wanted to spend more time with his grandson Marko, who like his son was named after a gray cat the family once owned.

But then he complained angrily that mobs had been allowed to destroy a Belgrade perfume shop owned by his son and set aflame the home of a close Socialist Party associate in the city of Leskovac. Kostunica replied quickly that when he visited Leskovac during the campaign, he was pelted with eggs, stones and red paint.

"That man," Kostunica said, referring to the local Socialist leader in Leskovac, "organized the attack." Milosevic replied that he did not believe it. Kostunica pressed, accusing Milosevic of running a dirty political campaign. But Milosevic took the same approach he frequently used when U.S. officials complained to him about wartime atrocities by Yugoslav forces.

"I had nothing to do with it," Milosevic said--it was someone else's responsibility.

Less Than Total Surrender

As Kostunica quickly learned, it was less than total surrender. After he left the villa, Milosevic dialed his cell phone and asked for clearance to give a concession speech on television--but he did not say that he intended to announce to the country that he would remain active in politics.

Today, Milosevic and his wife remain in isolation at the Uzicka residence, surrounded by a hundred members of an army special forces unit. He communicates daily with Socialist Party leaders, advising them on how to hold on to the power they still have and figure out how to reclaim their cherished control over state-run media.

Milosevic has complained to Pavkovic that he is a traitor, according to a close friend of the general, and in angry phone calls has also leveled that accusation against leading members of his party and commanders in the police force.

Some opposition leaders worry that some police units remain loyal to Milosevic. But Obradovic says he is not troubled: The Socialist Party is riven by discord, and Milosevic has fewer and fewer allies every day.

"Eventually," he said with a grin, "the only 'patriots' on the face of the Earth will be Mr. Milosevic and his wife."

Correspondent David Hoffman in Moscow and special correspondent Zoran Radjen in Belgrade contributed to this report.