It was a real sugar rush!

Hundreds of people lined up at the New York Hall of Science on Monday to take home a piece of candy-topped, frosted history.

Gingerbread Lane, which features 1,251 hand-crafted structures, is poised, for the fourth year in a row, to take a Guinness World Record for the largest gingerbread village. And creator Jon Lovitch planned to give every piece of it away.

“The reaction has been incredible this year,” said Lovitch, 40, who makes every piece of the display in his Forest Hills apartment. “People really love it. They are really attached to it.”

Crowds have been marveling at the eye-popping spectacle since it was unveiled in November. Lovitch used about 4,800 pounds of frosting, 640 pounds of gingerbread and 750 pieces of candy to build the edible wonder.

Mildred Crawford, 69 of Whitestone, arrived two hours before the 3 p.m. giveaway to secure a first place spot.

“I’m so excited,” she said after nabbing the Unicorn and Company Lady Shoe store gingerbread house, a vision of purple-tinted sweetness. “I’m doing this for my grandchildren.”

Nine-year-old Claire Stenglein of Jackson Heights was all smiles as she walked away with Santa’s Tree Farm, which featured lots of yummy details such as green frosting trees.

“I think it’s cool,” she said. “I really like the little billboard. I like the stars on top of it.”

Every item on the house is edible, but Lovitch does not suggest people try to eat any of it.

“Some of this candy is two years old,” he said. “Plus thousands of people have been walking by this for 10 weeks.”

Instead, he suggested they coat the structures with several layers of lacquer to preserve them for future holiday seasons.

Lovitch, who spent almost 20 years as an executive chef at high-end hotels, now works on his gingerbread creations full-time. That has allowed him to make the structures, such as the Plum Pudding Hotel and Alice Kitty Cat Store, more intricate.

He’s already started next year’s display.

“The work is pretty intense,” said Judy Seltzer, Lovitch’s fiancé, who helped him distribute the houses on Monday. “But he’s doing what he loves and I’m totally supportive of it.”

Lovitch is still waiting to hear the final word from Guinness on whether this year’s effort will continue his winning streak. Last year he broke his own 2014 record of 1,003 houses with 1,102.

“The positive reaction really keeps me going,” said Lovitch. “No matter what is going on in the news cycle, no matter what is going on in your day, you stand here and look at this for two or three minutes and you forget everything.”