BELFAST, Maine — City residents were surprised Saturday afternoon by a horde of hunter-orange-wearing graphic designers who invaded downtown bearing pie.

Lots of pie.

After all, it’s March 14 (3-14) only once a year, and the group, which calls itself Project M, wanted to celebrate Pi Day in fine style.

Pi, 3.14159, is a mathematical constant and an irrational number — and pie, they reasoned, would bring people together for an irrationally good time.

“Everybody was asking if we’d had free pie,” said Rebecca Rowe of Brewer as she ate mouthfuls of pecan pie on the sidewalk of Main Street. “This is great. We love coming to Belfast.”

Her friend Jeanne Dorland of Brewer said that the two had come for a shopping trip when they were waylaid by the pie people.

“It’s a sunny day, and free pie,” Dorland said.

“It’s like the city came alive,” said Rowe.

That happy, bemused response suited the masterminds of Project M to a T — or even to a pi.

The project was started seven years ago by John Bielenberg of Belfast. A graphic designer by trade, he wanted to do something to motivate young, creative people, so he created what he calls “an intense program to inspire them to change the world.”

He has taken the Project M show to places as far away as Costa Rica and Iceland, but this particular two-week edition is based in Belfast. It has brought together 12 designers and other creative types from around the country. They’ve been staying in town, dining and shopping locally and working at the Waterfall Arts center.

The idea to bake pies for the community is a “Project M Blitz,” Bielenberg said, and the group came up with the idea the other night because member Rosanna Dixon knows how to make pies.

“Making pies is something we do in our family to share love,” said Dixon of Washington, D.C.

To share that love with Belfast, Dixon made 35 pies in 14 hours using one oven.

“It was a lot of fun,” she said.

Other participants helped with the baking, set up the orange design and devised a way to allow people to donate to whatever charity they wanted, if they wanted.

Some recipients included the Belfast YMCA, Big Brothers-Big Sisters and the Revolutionary Association of Women of Afghanistan. Others were a bit more absurd — the Free Lobster Movement, the Bernie Madoff Defense Fund, Lost Animals.

“The serious ones will get the money,” said Project M-er Reena Karia of Atlanta.

The day started with a parade at 1:59 p.m. exactly, to continue the pi theme, and it didn’t take people long to hear about the delicious giveaways.

“I think it’s great,” said Ana Foy of Belfast, who sampled the pecan pie. “I think it’s the kind of stuff that happens in Belfast a lot: ad hoc things that are kind of community-oriented.”

Alan Crichton, co-founder of Waterfall Arts, was snapping photos of all the excitement.

“I think it’s fantastic,” he said of the happening. “I think it’s the right thing to do. Anything that brings people emotionally together, makes them smile, feeds them — it’s a way of inspiring people. And it’s all about inspiration.”

Judy Gannon of Belfast sampled the strawberry pie, and sounded a bit inspired.

“I think it’s just fabulous,” she said. “They came together to just see what the town needs. I guess it needed some pie.”