They would travel from all over Minnesota, mostly by train, hauling their finest pigs and cows and cucumbers and pumpkins and homemade pies, eager to show off the products of their labors, to discover the newest tools and techniques of their trade, to take in a horse race or fireworks or possibly a risqué sideshow.

But after a year of hard and lonely work in the state’s remote reaches — miles away from cities, wheat fields away from neighbors, decades away from technology connecting them to the larger world — maybe the most important part was getting together with their fellow Minnesotans.

Attendees of the Minnesota State Fair around the turn of the 20th century would barely recognize its contemporary counterpart. But a few things have stayed pretty much the same, notably the sentiments behind the Great Minnesota Get-Together slogan.

“Some things haven’t changed at all,” said Mark Goodrich, the fair’s deputy general manager in charge of competitions. “Other things are almost the opposite.”

In the unchanged category are the displays of prize animals, art and crafts, baked goods and farm-crop samples — 19th-century fairgoers spent time admiring them just as 21st-century fairgoers do, though probably with a more discerning eye. Ye Old Mill celebrated its 100th anniversary last year, and a time traveler from 1916 could board a boat and float along its winding, quarter-mile tunnel without noticing much difference.

On the other hand, we modern fairgoers like to stroll around while eating weird stuff on sticks. Old-time fairgoers dug into square meals on picnic blankets or church dining halls (we do that, too, but in 1903 there were 89 dining halls to choose from — now there are only two).

We’ll visit the grandstand to see musical stars such as the Dixie Chicks or Weezer. They flocked to watch a star of the equine variety — Dan Patch, the world’s fastest horse — run around a mile-long track.

We’ll head to the Midway for the childlike thrill of being flung about in the air or winning a stuffed animal. They went seeking less wholesome thrills: sideshows where for a coin or two you could duck into a tent and gawk at scantily clad women, or at people with atypical body types — small, large, conjoined, hirsute, unusually elastic and so on.

Jerry Hammer, the fair’s genial general manager, shook his head at the insensitive attitudes underlying the old “freak” shows. “It was a whole different time, culturally.”

Reflecting cultural changes

Minnesota had a fair before it was even a state. First held in 1855 as a territorial fair, it jumped from city to city for about 30 years before Ramsey County donated land, formerly occupied by the county Poor Farm, as a permanent location.

Since then, the State Fair has changed as Minnesota has changed — in culture, technology and way of life. At the turn of the 20th century, half the state’s population lived on farms. Now it’s 1.5 percent, Hammer said.

He possesses an encyclopedic knowledge of fair history — and has witnessed an impressive chunk of it firsthand, growing up in a house within view of the fairgrounds, getting his first fair job as a teenager, working there full-time since 1977 and becoming general manager 20 years ago.

“It used to be like a trade show for farm folk,” he said. “Now it’s an educational show about the food chain. We’re connecting the 99 percent [who live in towns and cities] with the 1 percent who feed us.”

Take the Miracle of Birth Center, which opened in 2001. The fair’s most popular free exhibit, it lets enchanted crowds watch newborn calves, lambs, goats and piglets enter the world. Early fairgoers would have been baffled by anyone finding entertainment in such a humdrum occurrence.

“A hundred years ago, that would have been way too ordinary,” Hammer said. “It would be like showing a city guy, ‘Here’s an office building.’ ”

Showcasing Minnesota’s best

The Minnesota State Agricultural Society, which founded the fair in 1854, was dedicated to the “advancement of agriculture, horticulture and the mechanical and household arts,” as the fair’s 1887 annual report put it.

“And how can this be better accomplished than by preparing a full exhibit of the best products of our farms, orchards, gardens, herds, dairies, mines, mills, factories and workshops … and then gathering the people together, where they may study and enjoy and be profited by the great ‘object lesson’?”

The Great Object Lesson? As fair slogans go, the Great Minnesota Get-Together seems catchier. But just as showcasing Minnesota’s best is still an important part of the fair’s mission, said Keri Huber, the fair’s archivist, so is the 1887 goal of “gathering the people together.”

That would have been obvious to early fairgoers, for whom the fair might well have been their only trip to the Twin Cities in a year, Huber said.

“It was a big deal, 100 years ago, to come to the fair,” Goodrich said. “It may have been the major social event of the year.”

Fairgoers today — somewhere around 80-percent city dwellers, Hammer said — have different interests. Their fair to-do list might skew more toward cheese curds and cookies than cattle and combines. But the get-together part remains important, Goodrich said, in a state that often seems deeply divided over politics and other matters.

“When people come to the fair, those divisions are lessened,” he said. “It gives Minnesotans a place to be Minnesotans.”

Hammer has come to believe there’s something special in the fairgrounds — that the land itself has the power to connect and uplift.

“This place, it started as a poor farm,” he said. “It helped people get back on their feet, it gave them hope. There’s something in the ground here, it’s real — it still does. Whether we’re aware of it or not, it’s still doing the same thing.”