Another show of Kenyan dominance in distance running came down to a two-woman race Sunday at the New York City Marathon.

In cold and windy conditions, Mary Keitany, 32, edged her countrywoman Jemima Jelagat Sumgong, 29, after the two pulled away from the lead pack and battled for the final four miles. A two-time London Marathon champion, Keitany won the New York race for the first time.

Keitany’s time — 2 hours 25 minutes 7 seconds — was three seconds ahead of Sumgong’s, making it one of the closest finishes in race history. In 2004, Paula Radcliffe of Britain also beat Susan Chepkemei of Kenya by three seconds.

Victories in the women’s race by Keitany and in the men’s race by Wilson Kipsang — the fifth and sixth by Kenyans in the past four New York City Marathons — came as the country’s athletics program is under scrutiny. The women’s field received a jolt Friday with the news that Rita Jeptoo of Kenya, the winner of the 2013 and 2014 Boston and Chicago Marathons, tested positive for a banned substance in an A sample. (Her B sample must also test positive for her to be guilty of a doping violation.) Last month, an antidoping task force criticized Kenya’s track and field federation for what it said were lax antidoping efforts.