Mary Keitany of Kenya edged her compatriot Jemima Sumgong in a close race to win the 2014 New York City Marathon women's title on Sunday.

Keitany and Sumgong stamped their class against the rest of the participants as they pulled away from the pack to make it an All-Kenyan battle in the final four miles of the race.

The two Kenyans went toe-to-toe for the entire final four miles before Keitany squeaked past Sumgong in a down-to-the-wire finish. Keitany finished the 26.2 mile race in 2 hours, 25 minutes and seven seconds.

Sumgong finished the course in 2:25:10 -- just three seconds behind Keitany. It was the closest women's race in New York since Great Britain's Paula Radcliffe also finished three seconds ahead of Kenya's Susan Chepkemei in 2004.

"I worked hard for this opportunity," said Keitany, who has won her first NYC Marathon title. "I'm happy because I have a victory today, because I know I've been coming to New York two times, and I was in that position. So I'm happy today because it was a good day and I win."

Sara Moreira of Portugal ended up third in the grueling race, clocking 2:26:00. The 29-year-old, who made her marathon debut on Sunday, admitted that she had difficulties in maintaining her pace for the entire race.

"It was difficult," Moreira said of the race via Newsday. "Many things came to my mind, but I tried to focus, focus on the pace and look for information that my body would pass to me, telling me how well I was."

NYC Marathon 2014 Women's Race Top 10 Finishers

1) Mary Keitany 2:25:07

2) Jemima Sumgong 2:25:10

3) Sara Moreira 2:26:00

4) Jelena Prokopcuka 2:26:15

5) Desiree Linden 2:28:11

6) Rkia El Moukim 2:28:12

7) Firehiwot Dado 2:28:36

8) Valeria Straneo 2:29:24

9) Buzunesh Deba 2:31:40

10) Annie Bersagel 2:33:02

Meanwhile, on the men's side, Wilson Kipsang of Kenya won the race to bag his third major marathon title in 13 months after also winning in Berlin and London.

Kipsang finished the race in two hours, 10 minute and 59 minutes, while Lelisa Benti of Ethiopia ended up second with a time of 2:11:06. The top 10 finishers for the men's marathon is are listed below:

1) Wilson Kipsang 2:10:59

2) Lelisa Desisa Benti 2:11:06

3) Gebre Gebremariam 2:12:13

4) Meb Keflezighi 2:13:18

5) Stephen Kiprotich 2:13:25

6) Geoffrey Mutai 2:13:44

7) Masato Imai 2:14:36

8) Peter Cheruiyot Kirui 2:14:51

9) Ryan Vail 2:15:08

10) Nick Arciniaga 2:15:39