BOSTON (AP) — A large police presence greeted runners and spectators filtering in Monday morning for the Boston Marathon, a year after a pair of homemade pressure-cooker bombs near the finish line killed three people and wounded more than 260 others.

Despite heightened security, the mood was festive at the fine line on Boylston Street. Spontaneous applause broke out as a group of Boston police officers walked near the site of last year’s twin bombing and children danced as the Rolling Stones’ song “Start Me Up” blared over the loudspeakers.

About 36,000 runners have registered for the race — the second-largest field in its history, many of them coming to show support for the event and the city that was shocked 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, who was running the marathon last year and made it 25½ miles before she was stopped less than a mile from the finish line when the two bombs exploded. “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.”

The most obvious change for the 118th edition of the world’s oldest annual marathon was the heavy security presence. State and local police officers were everywhere, even on the rooftops of some buildings.

Helicopters circled above and bomb-sniffing dogs checked through trash cans. Yet for all the security, the atmosphere was also calm and friendly.

“I think everybody is being very pleasant,” said Jean Bertschman, a Hopkinton resident who comes to watch the start of the marathon most years and had never seen anything close to this level of security. “I think it’s going to be a very good race.”

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.

“There’ll be considerably more police presence,” Massachusetts Gov. Deval Patrick said Sunday on CBS’ “Face the Nation.” ”But we also don’t want to have it, you know, kind of a race through a militarized zone. So it’s about striking a balance, and I think we have struck that balance.”

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.

Patrick said there have been no specific threats against the race or the city for the Massachusetts holiday of Patriots’ Day.

“We’re not taking that as a sign to sort of stand down,” he said. “We’re very prepared, and we’re assuring people as much as we can that it’ll be a fun day and a safe one.”

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.”

Authorities say two ethnic Chechen brothers who lived in the former Soviet republic of Kyrgyzstan and the Dagestan region of Russia planned and orchestrated the marathon bombings on April 15, 2013.

Tamerlan Tsarnaev, 26, died following a shootout with police days after the bombings. Dzhokhar Tsarnaev, 20, has pleaded not guilty to federal charges and is awaiting a trial in which he faces a possible death sentence. Prosecutors say the brothers also killed MIT police Officer Sean Collier days after the bombings in an attempt to steal his gun.

___

Associated Press writers Bob Salsberg in Hopkinton and Michelle R. Smith in Boston contributed to this report.

___

Follow Jimmy Golen on Twitter at: http://www.twitter.com/jgolen