It was the best of times, it was . . . okay, maybe, like, second-best. But their summer was still better than yours, right?

The mighty McLean all-stars — a dozen Northern Virginia middle-schoolers with braces, braids and a previously perfect record — lost in the Little League Softball World Series final Wednesday night in Portland, Ore., (and on national TV) 9-0 to the Sunnyside Little League team from Tucson.

There was no fairy-tale ending for the fab 12 from Fairfax County, who had been so good during a dream run through the state championships, the Southeast regional tournament in Georgia and the first five games of the World Series at Alpenrose Stadium.

The girls from McLean — media darlings back home and on ESPN2 — staggered into the final chapter of their storybook summer, logging more errors and wild pitches than hits in the crushing championship-game loss, which was never particularly close.

Sunnyside scored two runs in the bottom of the first inning; added another in the third without a hit (walk, wild pitch, ball thrown into center field); then scored six more in the fourth, which was a blur of walks, wild pitches and hard line drives.

The Tucson all-stars played perfect defense behind ace pitcher Jazmine Ayala, whose change-up vexed McLean. Ayala retired the first 10 batters she faced and allowed just two base runners, both on singles, to Madison Wolfe and Caitlin Jorae.

McLean’s own top gun, Kathryn Sandercock, was prohibited from pitching in the championship, having thrown a complete game in Tuesday’s semifinal win over the team from Robbinsville, N.J. McLean’s second-best pitcher, Gabi Norton, was home with mononucleosis and missed out on the entirety of the team’s excellent Portland adventure (limo rides, swag bags, nail-painting bonding sessions, going public with their love of Justin Bieber and One Direction).

“You can’t expect to be perfect,” said McLean’s volunteer manager, Gerry Megas, on Thursday morning as the team prepared to fly home. “The girls were disappointed but also knew they had a great run and were the second-best team in the world. . . . Not too shabby.”

Megas, the chief financial officer for a national nonprofit organization that builds playgrounds, said he was struck by something that happened in the fourth inning “when all appeared lost.”

On the game’s brightest stage, with the team on the verge of a slaughter-rule defeat, the girls “were amazingly supportive of each other — true caring teammates. I was very proud of how they hung together even under such trying conditions.”

Now the girls return home — back to Cooper Middle School and Little Langley and the like — as the second-best group of 12- and 13-year-olds in all of Little League softball.

Heroes, in other words, in a community that takes its softball quite seriously. There’s tradition to uphold, after all: McLean won the Little League Softball World Series in 2005, a year after losing the title game to the erstwhile national powerhouse, Waco, Tex.

Now comes hopeful chatter about a potential sequel: Six players from the team that went 5-1 at the World Series will be eligible to play Little League again next year — giving McLean a second shot at the Best. Summer. Ever.