FRAMINGHAM, Mass. — Over the long, cold winter, Boston has been preparing a ceremony to honor those killed and injured in the bombings at last year’s marathon and to stage a race this year that will be one of the biggest — and, they said Monday, the safest.

The 118th running of the Boston Marathon, scheduled for April 21, has drawn a huge field of about 36,000 runners, which is capacity for the course and 9,000 more than last year. The runners include thousands who were forced to stop last year after the explosions and thousands more who want to show their solidarity with Boston. (The record number was set in 1996 at the marathon’s centennial celebration, when 38,708 runners entered.)

At least one million spectators, twice the usual crowd, are expected to gather along the 26.2-mile course, many of them at the finish line on Boylston Street, where two bombs exploded, killing three people and injuring 260 others.

The security challenge is immense, in part because the event is spread across eight cities and towns along a route lined by spectators on both sides.