The former chief security minister, Gen. Susilo Bambang Yudhoyono, was projected to finish first in Indonesia's balloting for president Monday, according to a quick count of sample districts, as he capitalized on disillusionment with incumbent Megawati Sukarnoputri's stewardship of the country's transition to democracy.

But Yudhoyono failed to win an outright majority and was headed to a Sept. 20 runoff, with Megawati competing for the other spot in the second round, based on an estimate by the Washington-based National Democratic Institute.

The projections showed Yudhoyono winning 34 percent of the vote while Megawati and the former armed forces commander, Gen. Wiranto, were in a statistical dead heat for second with about 25 percent each. The estimates, based on results from 1,583 polling stations in all of Indonesia's provinces, indicated that two other contenders would finish far behind.

With about 12 percent of the ballots counted by Indonesia's election commission, Yudhoyono was leading Tuesday morning with 33 percent of the votes. Megawati was second with 26 percent and Wiranto trailed with 23 percent. Election officials said they hoped to complete an informal canvass later this week.

The relatively smooth conduct of the election, held at 575,000 polling stations on thousands of islands, marked a milestone for a country that emerged only in 1998 from 32 years of autocratic rule under President Suharto. The vote was Indonesia's first direct election for its leader. Previously, the country's parliament chose the president through a process characterized by backroom dealmaking.

Yudhoyono, 54, had been a strong favorite to win the race ever since he bolted from Megawati's cabinet in March, complaining he had been slighted by the president and her influential husband. He was considered a firm and thoughtful leader by many Indonesians, and his resignation earned him widespread sympathy among a public irritated by the perceived arrogance of Megawati and her inner circle.

Yudhoyono, in his position as chief security minister, had established a working relationship with U.S. and other foreign leaders in confronting terrorism. Some critics called him indecisive, but diplomats said the retired general, if elected, would likely heighten Indonesia's determination to address Islamic extremism.

Speaking to reporters while walking to his polling station in a Jakarta suburb, he said he was confident of a place in the runoff. "I have traveled the country and seen the people's support for me," said Yudhoyono, commonly known by his initials SBY.

Although the campaign has been peaceful, he warned that a runoff could provoke tension. "Supporters will face each other and there is potential for confrontation," he said. "The key is for the candidates and their supporters to restrain themselves."

Megawati, 57, declined to talk to reporters while casting her ballot in southern Jakarta, but her husband and chief political adviser, Taufik Kiemas, sounded upbeat. "I'm optimistic that Mega will win. The most important thing is that everything must be according to the rules," he said, quoted by the Indonesian news portal

If Megawati fails to make the second round, it would set up a showdown between retired generals, which could raise the fears of some Indonesians that the military is planning to reassert control over the country's politics. So far, most of the concern has centered on Wiranto, who has been indicted on charges of crimes against humanity by a U.N.-supported tribunal in connection with a 1999 wave of militia violence in East Timor.

Speaking to reporters after voting in eastern Jakarta, Wiranto, 57, said he was prepared to abide by the electorate's wishes. "Whatever the result will be, we will accept it gracefully," he said.

At many polling stations, turnout started slower than predicted, but officials said this did not reflect voter apathy. They attributed it to the weariness of millions of Indonesians who had stayed up until 3:30 a.m. Monday to watch the televised finals of the European soccer championship in Portugal.

"This election is fascinating for us because people are really being asked for their choice and we can decide based on our own heart," said Thian Sian Bing, 52, after voting in northern Jakarta.

By midday, nearly three-quarters of the eligible voters in his Gunungsahari Utara district had passed through the makeshift polling station, located deep down a concrete alley too narrow for a car.

This district, with many ethnic Chinese and Indian residents, had delivered an overwhelming majority for Megawati's party in the parliamentary contest of 1999, the last year Indonesians voted in national elections. According to election officials, she carried the district again , winning more than half the votes.

Other districts that had rallied behind Megawati five years ago abandoned her wholesale, according to officials. Near the heart of Indonesia's main island Java, Yudhoyono won nearly two-thirds of the votes in the Pandean Lamper, a ramshackle district where in 1999 practically every voter had endorsed Megawati.

Special correspondents Noor Huda Ismail in Pandean Lamper and Natasha Tampubolon contributed to this report.

Election workers, wearing traditional Javanese dress, dump ballots out of the box for counting at a polling station in the ancient city of Yogyakarta, Indonesia.Supporters cheer the announcement of a vote for Amien Rais, a candidate who did not make the runoff, during the vote count in Jakarta.