Muggles and wizards alike gathered in downtown Keene this week to celebrate Harry Potter’s birthday.

In honor of the Boy Who Lived, who is thought to have been born July 31, Main Street has been transformed since Tuesday into Diagon Alley — the marketplace Harry Potter visited before traveling to Hogwarts to master the skills of witchcraft and wizardry.

Local businesses participating have magical treats and souvenirs for purchase through Sunday, the event’s last day.

While waiting with her mom Thursday to go inside Life is Sweet candy store on Central Square, Poppy Sommers, 9, said she is a huge fan of the Harry Potter books.

While wearing a Gryffindor tie and a Marauder’s Map face mask, Poppy explained that she started reading them last summer and is on the last of the series’ seven books.

“I like how the main character isn’t the smartest, but the girl is the smartest,” Poppy, of Hopkinton, said. “They don’t need her just to do the cooking and cleaning; they need her to do an adventure.”

Another diehard fan, Chloe Hebert, 11, was dressed in a full Hermione Granger costume — complete with her magic wand.

Chloe, of Leominster, Mass., had just arrived downtown, but said she looked forward to seeing the Three Broomsticks — normally known as Machina Kitchen & ArtBar on Court Street — which is based on a pub featured in the series.

In addition to serving cocktails, Machina is offering mocktails for children and Harry Potter-themed food.

Ultimately, though, Chloe said she was just thrilled to see all of downtown.

“I’ve been obsessed with Harry Potter, and we saw this; my mom literally texted me that, and I said, ‘Oh my gosh, yes, we need to come here,’ “ Chloe said. “I just like the drama and the magic.”

Life is Sweet has been feting Harry Potter’s birthday week for several years. But, when Eat More Cake started doing business inside of it a few months ago, the bakery’s owner, Amy Christiansen-Schoefmann, said she saw a chance to expand the festivities.

Each participating business had a good flow of customers Thursday afternoon, and Life is Sweet drew a noticeable crowd. Outside, a line wrapped around the building. Inside, however, the business required masks and limited its capacity.

The candy store had several Harry Potter-themed treats to choose from, including Eat More Cake’s Golden Snitch Nutella cake truffle, a nod to the wizarding world’s favorite pastime — Quidditch.

The event also intrigued Keene State College alumnus Joe Saucier, 34, who drove to Keene from Massachusetts specifically for the downtown transformation.

“I’ve wanted to visit Keene again,” Saucier, who graduated in 2009, said over Facebook messenger. “The HP event gave me all the reason I needed.”

The Southbridge resident said visiting Life is Sweet was his favorite part, although he also loved going to Soul Emporium and Beeze Tees.

Both of the latter locations sold whimsical face masks.

“The experience [at Life is Sweet] was almost like ordering treats and sweets from the lunch cart on the Hogwarts Express,” he said. “I chose a pumpkin pasty and was stupefied by how amazing the flavor was!”

Saucier added that he hopes the event becomes annual, and that it gets even bigger.

“It would be fantastic to get the Keene High School and Keene State Theater Department involved,” he said. “It would be magical to see some actor/actresses dressed up in robes and maybe mismatched muggle attire walking around.”

Olivia Belanger can be reached at 352-1234, extension 1439, or Follow her on Twitter @OBelangerKS.