BOSTON — With security tight along the 26.2-mile course, nearly 36,000 runners set out from the Boston Marathon starting line Monday in a “Boston Strong” show of resilience a year after the bombing that turned the race into a scene of carnage.

To the delight of many in the crowd, an American, Meb Keflezighi, won the men’s division for the first time in more than three decades, dominating a field that included many athletes who were prevented from finishing last year.

In the women’s division, Rita Jeptoo of Kenya successfully defended the Boston Marathon title she said she could not enjoy a year ago after the fatal bombings.

Keflezighi, a former New York City Marathon champion and Olympic medalist, ran the 26.2 miles from Hopkinton to the finish on Boylston Street in Boston’s Back Bay on Monday in 2 hours, 8 minutes, 37 seconds.

Keflezighi held off Wilson Chebet of Kenya who finished 11 seconds behind. The 38-year-old from San Diego looked over his shoulder several times over the final mile. After realizing he wouldn’t be caught, he raised his sunglasses, began pumping his right fist and made the sign of the cross.

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.

Jeptoo finished Monday’s race in a course-record 2 hours, 18 minutes, 57 seconds. She becomes the seventh three-time Boston Marathon champion.

Jeptoo broke away from a group of five runners at the 23-mile mark. Buzunesh Deba finished second with an unofficial time of 2:19:59.

American Shalane Flanagan finished fifth after leading for more than half the race. She took a gamble by setting the early pace. She ran her first mile in 5 minutes, 11 seconds, but fell back on the Newton Hills about 21 miles into the race.

The first woman and man from Maine to cross the finish line were Erica Jesseman of Scarborough and Byrne Decker of Yarmouth.

Jesseman, 24, slowed considerably late in the race but managed to hold off Sheri Piers of Falmouth by eight seconds in 2 hours, 42 minutes, 32 seconds. Piers, 42, placed fourth among female masters.

Decker, 47, returned to race after an absence of seven years and finished in 2:33:36. Caribou native Spencer McIlwain, 24, who led all Mainers at the halfway mark, reportedly had hamstring issues in the final miles and reached the line in 2:37:58.

Keflezighi (kehf-LEHZH’-gee) wore his official runner’s bib with the names of the three people killed in last year’s marathon and the name of a police officer from MIT who was allegedly killed by the bombing suspect days later.

Keflezighi said he hoped to have his picture taken with the victims’ families after his win Monday, but they weren’t immediately available.

The victims were 8-year-old Martin Richard, 29-year-old Krystle Campbell and 23-year-old Lu Lingzi . MIT Officer Sean Collier was shot three days after the marathon.

A total of 35,755 athletes were registered to run — the second-largest field in its history, with many coming to show support for the event and the city that was traumatized by the attack on its signature sporting event.

“I can’t imagine the number of emotions that are going to be there,” said Katie O’Donnell, a doctor at Children’s Hospital who was stopped less than a mile from the end last year. “I think I’m going to start crying at the starting line, and I’m not sure I’ll stop until I cross the finish line.”

Buses bearing the message “Boston Strong” dropped off runners at the starting line in the town of Hopkinton. A banner on one building read: “You are Boston Strong. You Earned This.”

Among the spectators cheering runners near the finish line was Jeff Bauman, who lost his legs in the bombing. It was the first time he had returned to the area since the attack.

“It feels great” to be back, he said. “I feel very safe.”

Joe Ebert, 61, of Hampton, N.H., was cheering on his son-in-law near the spot in downtown Boston where the bombs went off. He was in the same area last year at the time of the attack.

“I wanted to be in this spot,” said Ebert, who wore a jacket and medal from when he ran the race in 2010. “Just wanted to let them know that they can’t beat us down. I think it makes us all stronger when something like that happens.”

Sabrina Dello Russo, 38, of South Boston, was running her first marathon for a good friend, Roseann Sdoia, who lost her right leg in the bombing.

“She is my inspiration from day one last year when I saw her in the ICU. Every run I do, she is in the back of my head, and she will be keeping me going today,” Dello Russo said.

While Gov. Deval Patrick said there had been no specific threats against the race or the city, spectators at the 118th running of the world’s oldest annual marathon had to go through tight checkpoints before being allowed near the starting and finish lines.

Fans hoping to watch near the finish line were encouraged to leave strollers and backpacks behind. Police set up checkpoints along the marathon route to examine backpacks, particularly outside subway station exits. And runners had to use clear plastic bags for their belongings.

More than 100 cameras were installed along the route in Boston, and race organizers said 50 or so observation points would be set up around the finish line to monitor the crowd.

Runner Scott Weisberg, 44, from Birmingham, Ala., said he had trouble sleeping the night before.

“With everything that happened last year, I can’t stop worrying about it happening again. I know the chances are slim to none, but I can’t help having a nervous pit in my stomach,” Weisberg said.

Race organizers expanded the field from its recent cap of 27,000 to make room for more than 5,000 runners who were still on the course last year at the time of the explosions, for friends and relatives of the victims, and for those who made the case that they were “profoundly impacted” by the attack.

Other runners were expected to remain on the course for several hours after the winners crossed the finish line. Last year, the bombs went off at 2:49 p.m., as spectators crowded around the finish the line to cheer the still-arriving runners about five hours into the race.

Dzhokhar Tsarnaev, 20, is awaiting trial in the attack and could get the death penalty. Prosecutors said he and his older brother — ethnic Chechens who came to the U.S. from Russia more than a decade ago — carried out the attack in retaliation for U.S. wars in Muslim lands.

Tamerlan Tsarnaev, 26, died in a shootout with police days after the bombings.

One runner Monday, Peter Riddle, a 45-year-old Bostonian, said he suffered post-traumatic stress disorder from being at the finish line last year.

“I did a lot of talking this year, but running has helped me resolve a lot of things in my head,” he said. “Running the marathon this year and running down Boylston Street will help me find peace and help me move forward.”