The thick blanket of fog had long lifted and the finish line was in sight, but there was still nothing close to clarity in this race. Kenyan Paul Tergat, a distance running legend, and South African Hendrick Ramaala, the defending champion, ran together as if matched in a 100-meter sprint. And, after 26 miles and perhaps 285 yards in the New York City Marathon on Sunday, they were.

It was a blur of thrashing elbows and churning legs. Fans leaning over the fences yelled or held their breath as the two slender men blew by, side-by-side, stride-for-stride, furiously taking on the last bit of hill. Tergat, who seemed to run easily until this moment, his singlet neatly tucked into his shorts, suddenly bared his teeth with the effort. Ramaala, a grimacing performer all morning, pumped his arms wildly and looked to be screaming in agony.

Ramaala stumbled headfirst over the line either in a last-ditch attempt to take the lead, or from plain exhaustion. Too late. Tergat, the marathon world record holder, hit the tape first, claiming the victory in 2 hours 9 minutes 30 seconds. Ramaala, who tumbled onto his back as medical personnel swarmed to him, officially finished behind by one second. But the time difference between the two was just .32 of a second (2:09:29.90 to 2:09:30.22) in the closest finish in New York City Marathon history.

"Who wants to go the last 100 meters with Paul?" Ramaala said later, shaking his head. "Sheesh. . . . Paul didn't want to lose. I didn't want to lose. . . . I gave it everything. He was better over the last 100 meters. I wasn't going to give up. I was beaten by a great champion."

American Meb Keflezighi, the reigning Olympic silver medalist who finished second here last year, ran with Tergat and Ramaala through Mile 24, then fell off dramatically as his calves clenched with cramps. Still, fewer than two months removed from a quadriceps injury, Keflezighi earned third place in 2:09:56. Abdi Abdirahman, never a factor in the race, finished fifth in 2:11:24, making him and Keflezighi the first Americans to finish in the top five since 1993.

The women's race packed similar drama in Central Park. Kenyan Susan Chepkemei, who finished just three seconds behind Paula Radcliffe in last year's race, seemed determined to prevent a similar outcome Sunday, sprinting out to a substantial lead at Mile 22. But she paid dearly for the surge. Just when it seemed Chepkemei had left her rivals behind, breaking out by about 100 yards, she became ill. She vomited several times. She kept running.

Latvian Jelena Prokopcuka, a lanky woman who towered over the field, could not help but notice Chepkemei's struggles. Prokopcuka, slowed substantially by a stitch in her side at the 18th mile, sensed she could finally make up all the time she had lost. She and Ethiopia's Derartu Tulu caught up with Chepkemei, who somehow kept up a respectable pace if not a dominating one.

"When I start to throw up, at that time I lose some ground," Chepkemei said. "That's why she came closer and closer."

Said Prokopcuka, who finished fifth here last year: "I saw [the problems]. I got confident that I could win."

As the trio ran together through Central Park, Chepkemei regained at least some of her rhythm, but she could not match Prokopcuka's power over the last mile. As Chepkemei became resigned to another second place, Prokopcuka claimed her first New York title in 2:24:41. Chepkemei finished 14 seconds back. Tulu finished in 2:25:21.

Tergat, 36, all but sneaked to victory Sunday. Early in the race, he wasn't even in the lead pack. Even when he joined the leaders, he hung to the back, moving out to the front for the first time at Mile 22. His face betrayed no strain as others threw down challenges. On First Avenue, with eight miles remaining, Ramaala surged three times to try to build a lead, but Keflezighi and Kenya's Robert Kipkoech Cheruiyot kept chasing him down. They covered Mile 17 in a stunningly fast 4:22. Tergat, meantime, just sauntered along, falling behind by 30, 40 meters. "He was the most patient of all three of us," Keflezighi said of Tergat, a five-time world cross-country champion. "He hasn't done a lot of marathons, but he's been successful at what he does."

One of 17 children who grew up in poverty in Kenya's Rift Valley, Tergat, who set the world record at the 2003 Berlin Marathon (2:04:55), finished 10th at the 2004 Summer Games in Athens after battling an upset stomach, and eighth in this year's London Marathon after developing a hamstring problem at Mile 18. He won Olympic silver medals in the 10,000 meters in the 1996 and 2000 Summer Games, losing out in similar sprints.

"I was not expecting a sprint finish" here, Tergat said. "It was really, really painful. . . . When I cut the tape, I knew I had it. That was consoling. . . . New York is one of the greatest races in the world. Winning it is very special to me."

Paul Tergat edges a stumbling Hendrick Ramaala by .32 of a second in the closest New York City Marathon finish ever.