Buses bearing the message "Boston Strong" dropped off runners. A banner on one building read: "You are Boston Strong. You Earned This."
Spectators went through tight security checkpoints before being allowed near Hopkinton Common.
Massachusetts Gov. Deval Patrick said officials were trying to keep a traditional family feel to the marathon while maintaining tight security.
As he started the mobility-impaired race, Patrick said he encountered a woman who had suffered a brain injury in last year's attack but was determined to run this year.
"Just before we set off the runners, she burst into tears," the governor said.
Runners attending the event will have to use clear plastic bags for their belongings, and fans hoping to watch near the finish line are encouraged to leave strollers and backpacks behind. More than 100 cameras have been installed along the route in Boston, and 50 or so "observation points" will be set up around the finish line "to monitor the crowd," the Boston Athletic Association 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.
Lelisa Desisa of Ethiopia and Kenya's Rita Jeptoo, who crossed the finish line on Boylston Street about three hours before the explosions, will return to defend their championships. Desisa returned to Boston last fall to donate his first-place medal to the city as a gesture of support.
Jeptoo, who also won the race in 2006, said she is hoping for a third victory — and one she can enjoy.
"It was very difficult to be happy. People were injured and children died," she said of last year's marathon. "If I'm going to win again, I hope I can be happier and to show people, like I was supposed to last year."