Keitany had won three straight NY marathons, but Flanagan pulled away from the Kenyan great with about three miles to go.
Marblehead native Shalane Flanagan won the New York City Marathon on Sunday, becoming the first American woman in 40 years to accomplish that feat.
Two years after losing the lead late in the 26.2-mile race, Kamworor held off compatriot Wilson Kipsang to win in an unofficial time of 2hrs 10mins 53secs. He and Kipsang embraced just past the finish line to huge cheers.
Manuela Schaar won her first New York City Marathon in 1:48:09 after finishing second to American Tatyana McFadden for the past three years. She placed second in her debut in 2010.
Kamworor, 24, was in only his seventh marathon.
Beating Keitany in NY may be running's toughest test right now.
At the 2011 Berlin Marathon, Kamworor pushed Patrick Makau to break the world marathon record with new times of 2:03:38 as Ethiopian Yemane Tsegay won in 2012 Rotterdam.
Flanagan, a four-time Olympian, completed the women's event with a time of 2 hours, 26 minutes, 53 seconds, according to USA Today, defeating Kenyan competitor Mary Keitany, who came in second to Flanagan after winning the New York City Marathon for the past three years.
"Thank you NY for showing up today", Keflezighi told the crowd.
The race went off without interruption five days after the bike path terror attack killed eight in lower Manhattan. The security detail will include hundreds of extra uniformed patrol and plainclothes officers, roving teams of counterterrorism commandos armed with heavy weapons, bomb-sniffing dogs and rooftop snipers poised to shoot if a threat emerges. Like many in Puerto Rico, Ramos was without power after the storm.
Among celebrities in the race, Kevin Hart had the best request.