President Megawati Sukarnoputri narrowly made it through the first round of Monday's nationwide election and will face a runoff Sept. 20 with her former chief security minister, Gen. Susilo Bambang Yudhoyono, according to projections released Tuesday.

A tally of sample districts compiled by the Washington-based National Democratic Institute showed that Megawati will qualify in the race against Yudhoyono, who was projected as the top vote finisher.

The institute, which reported earlier that Megawati was in a statistical dead heat for second place, said revised estimates based on additional returns showed her outdistancing the former armed forces commander, Gen. Wiranto, by almost 3 percent.

The quick count, based on results from 1,719 polling stations, gave Megawati slightly more than 25 percent of the vote. That would be much better than election eve projections, which suggested that Megawati, the daughter of Indonesia's founding father, the late president Sukarno, might be turned out of office. Many voters had expressed disappointment with her leadership, only three years after she ascended to the presidency as a symbol of the country's democratic aspirations.

Indonesia's election commission, reporting that nearly half of the vote had been counted, said Yudhoyono was leading early Wednesday with 34 percent, followed by Megawati with 27 percent. Wiranto trailed with 22 percent. Two other contenders were far behind.

Rizal Mallarangeng, a political analyst close to the president, said Megawati had reversed her sagging fortunes by retooling her campaign strategy in recent weeks. Widely considered aloof, she took her campaign from the palace to crowded markets and revamped her television advertising, portraying herself as a caring, motherly figure, Mallarangeng said.

At the same time, he said, Yudhoyono's runaway popularity began to slip as voters took a closer look at a candidate who had surged into the lead since leaving the cabinet in March. Just last week, some surveys showed Yudhoyono, commonly known by his initials SBY, within reach of an outright majority, but now he looked unlikely to reach 40 percent of the votes.

"If I were SBY, I would not only be a little worried. I wouldn't be able to sleep," Mallarangeng said, asserting that the momentum has shifted to Megawati.

But Daniel Sparringa, a political sociologist at Airlangga University, said Yudhoyono remained in a strong position for the runoff. Sparringa contended that Megawati had moved up quickly because of an anonymous smear campaign against Yudhoyono. Spread by cell phone text messages and leaflets, the campaign accused him of supporting strict Islamic law and being insensitive to non-Muslim minorities. Sparringa did not blame Megawati for the attacks.

Though Wiranto also fared better than polls predicted, the National Democratic Institute projection indicated that his effort fell short. His elimination from the race would remove a potential irritant in relations between the United States and Indonesia. U.S. officials have expressed concern about the prospect of a Wiranto presidency. He has been indicted by a special U.N.-backed tribunal examining crimes against humanity during a wave of militia killings in East Timor after its 1999 vote for independence from Indonesia.

Analysts said a crucial question would be whether Wiranto and his Golkar Party, the largest in parliament, would give unified support to either Yudhoyono or Megawati.

Former president Jimmy Carter, who led a mission from the Atlanta-based Carter Center observing the election, praised Indonesians for their "commitment to an honest and democratic procedure."

"This is a major step forward on a global scale," Carter said. He said that Indonesians "almost miraculously" have established a successful democracy just six years after the end of former president Suharto's authoritarian rule. Indonesia had demonstrated that the world's most populous Muslim country could adopt a democratic system and secular government, he said.

Indonesian Election Commission workers process ballots at a district government office in West Jakarta. More than 40 percent of the votes cast have been counted.Guards working for the Indonesian Election Commission sit on top of locked boxes of ballots at a district government office in West Jakarta after Monday's vote for president.