As the lead pack of 15 runners turned onto Waverly Street in Framingham on Monday and reached the 6-mile mark of the Boston Marathon in 29:50 in, ahem, hot pursuit of early pace-setter Glenn Randall, the traffic light above the runners’ heads changed from flashing red to flashing green. Little did they know that race organizers didn’t give the same signal to the marathon until earlier that morning.

“Two words that come to mind are stressful and surreal,” race director Dave McGillivray said during yesterday’s wrap-up media conference held at the Fairmont Copley Plaza Venetian Room. “Stressful, not just on race day, but also on the days leading up to the race. It seemed like 2007 all over again. Go or not go. If it was any other race that I was directing I may have leaned toward no go.”

McGillivray began the day riding on the back of a lead motorcycle from Hopkinton. Officials measured the temperature at 77.6 degrees through Framingham, where it then soared to 89, and by the finish line the thermometer was at 87.

“Runners always think that they can do something but we said, ‘Can we manage things after the race?’ Last year, I said, ‘It’s always going to boil down to the weather and this (2011) was as perfect as it gets,’ ” said McGillivray, who ran the course after completing his duties. “This year was the complete opposite. Even a few of our motorcycles conked out.”

Executive race director Tom Grilk said, “This was not a race. It was an experience. That’s what it was. For everyone who prepared for it, everyone knew what was coming. It wasn’t the kind of day we wanted, but it was a day we planned for and (the medical personnel) handled it. What was arresting was the superb level of execution. They had contingency after contingency.”

A cursory glance at the post-race figures showed 22,535 started the race and 21,603 finished, with only 932 dropouts. The numbers compared with recent adverse-weather Boston Marathons in 2004 (86 degrees), which saw 20,404 registered runners and 16,783 finishers, and 2007 (nor’easter), which saw 23,906 people register to run and 20,370 finish.

Medical coordinator Chris Troyanos, who was described as an “unsung hero” by McGillivray, has been associated with the event since 1977. Yesterday, Troyanos said the event has changed for him from a sporting event to a “planned mass casualty event.” Troyanos also praised area hospitals and the entire medical support team.

“The contingency plans that I requested were all met,” Troyanos said. “I felt like I had an open checkbook to make the race safe.’’

The prime beneficiaries of the heat were men’s and women’s open division champions Wesley Korir (2:12:40) and Sharon Cherop (2:31:50), both of Kenya, and wheelchair winners Joshua Cassidy (1:18:25) of Canada and Shirley Reilly (1:37:36) of Tucson, Ariz. Cassidy nipped Ernst Van Dyk’s world best time of 1:18:27, set at Boston in 2004.

“I knew it was close or I just missed it,” said Cassidy, who will compete in Sunday’s London Marathon. “I like hot days over cool ones for the marathon.”

Korir said his confidence picked up when he learned of predictions for the weather.

“When I heard the weather was going to be hot I said, ‘Yes, that is good for me.’ I obviously don’t like cold weather. I don’t like to run in cold weather, but I love hot weather. But I think it was also because I was able to plan accordingly. I have a lot of people around me, my agent, my coach, advising me and telling me, ‘Don’t be crazy.’

“I knew I had to go out conservatively and not make any crazy move that can get my body out of balance and put you in a ditch. So, when (the lead pack) took off, I wish I had an opportunity to tell them, ‘You guys are crazy.’ I was not going to go with them. I thought about my daughter (McKayLA). I thought about my wife (Tarah). I thought my about my body. I didn’t want to go to the hospital. I wanted to go home.”