"At the end, I just kept thinking, 'Boston Strong. Boston Strong,' " he said. "I was thinking 'Give everything you have. If you get beat, that's it.' "
Keflezighi completed the 26.2 miles from Hopkinton to the finish on Boylston Street in Boston's Back Bay on Monday in a personal-best 2 hours, 8 minutes, 37 seconds. He held off Kenya's Wilson Chebet, who finished 11 seconds behind.
Keflezighi went out early and built a big lead. But he was looking over his shoulder several times as Chebet closed the gap over the final two miles. After realizing he wouldn't be caught, Keflezighi raised his sunglasses, began pumping his right fist and made the sign of the cross. He broke into tears after crossing the finish line, then draped himself in the American flag.
No U.S. runner had won the race since Lisa Larsen-Weidenbach took the women's title in 1985. The last American man to win was Greg Meyer in 1983. Meyer and Keflezighi embraced after the race.
"I'm blessed to be an American and God bless America and God bless Boston for this special day," Keflezighi said.
Rita Jeptoo of Kenya successfully defended the women's title she said she could not enjoy a year ago. Jeptoo finished in a course-record 2 hours, 18 minutes, 57 seconds. She is a three-time Boston Marathon champion, having also won in 2006.
"I came here to support the people in Boston and show them that we are here together," she said. "I decided to support them and show them we are here together."
Jeptoo broke away from a group of five runners at the 23-mile mark. Buzunesh Deba of Ethiopia finished second in 2:19:59. Countrywoman Mare Dibaba was third at 2:19:52. All three women came in under the previous course record.
American Shalane Flanagan, who went to high school in nearby Marblehead, finished seventh after leading for more than half the race. She gambled by setting the early pace, but fell back on the Newton Hills about 21 miles into the race.
"It does mean a lot to be that my city was proud of me," she said. "I'm proud of how I ran. I don't wish I was it was easier. I wish I was better."
After breaking a 27-year American drought at the New York marathon, Keflezighi contemplated retiring after the 2012 NYC Marathon. But that race was canceled because of Superstorm Sandy, and he pulled out of the Boston Marathon last April because of injury. He watched the race from the stands at the finish line, but said he left about five minutes before the bombs went off.
He was the first American to medal in an Olympic marathon since Frank Shorter won gold in 1972 and silver in 1976.
Born in Eritrea, Keflezighi moved with his family to San Diego in 1987, and he became a U.S. citizen in 1998.
Another American, Tatyana McFadden, celebrated her 25th birthday Monday by winning the women's wheelchair race for the second straight year. She was timed in in 1 hour, 35 minutes, 6 seconds.
Ernst van Dyk of South Africa won the men's wheelchair division for a record 10th time. The 41-year-old crossed in 1 hour, 20 minutes, 36 seconds.
Last year's men's champion, Lelisa Desisa, did not finish this year's race, and had to be picked up by a van about 21 miles into the event.
Marathon officials said 35,755 runners registered for the race, with 32,408 unofficial starters. The field included just less than 5,000 runners who were not able to finish last year and accepted invitations to return this year.