This time they were certain.

As the 1830's gave way to the 1840's, the area around Groton and towns across the northeastern corner of the Bay State became hotbeds of a short-lived religious fervor that reached its climax in the fall of 1844.

This particular moment had been foretold by William Miller, a Pittsfield-born preacher and unlikely prophet, explains David Holland, a professor of religious history at Harvard divinity school.

"Everywhere the Millerites looked they thought they saw proof that the end was coming, proof that world was due to be transformed in short order," Holland said.

The date had been determined. They had put their affairs in order. Some had sold everything they owned.

"They’re waiting for the literal return of Jesus Christ and the destruction of the wicked and the vindication of the righteous," Holland said.

They gathered in groups small and large throughout the country, in homes, on farms — some, they say, on rooftops.

"The minute midnight of the 22nd strikes, the morning of the 22nd, they’re gathered together and waiting, breathlessly for this moment," Holland said.

Miller had lost his faith in Christianity for a time around the turn of the 19th century, until he was involved in the War of 1812, where he had some pretty profound existential experiences.

Miller’s deep concerns with death and the afterlife following the war drove him back to the Bible, where he took a particular interest in the books of Daniel and Revelations.

"In the course of returning to the Bible with a great deal of zeal, he believed that he had cracked the millennial code, that he had determined, roughly, when the second coming of Jesus Christ would take place and that it would take place very soon," Holland said.

By the 1830s, Miller’s prediction had attracted a small following in and around his home in Vermont. But when he hooked up with Boston-based publisher Joshua Himes, the Millerite movement exploded. Himes launched a Millerite newspaper, published pamphlets and organized camp meetings, rallies and lectures.

"William Miller does travel through Massachusetts, repeatedly as a lecturer and drawing huge crowds and in some cases a great deal of opposition in was a controversial message," Holland said.

But that message struck a chord with many — and not just those on the fringe. It was a time of great upheaval in American society, says Holland, and Miller’s message had uncanny resonance.

"They’re very much at the heart of Massachusetts society and that’s part of what made the movement so explosive," he said.

Holland says that Miller had long been reticent to put an exact date on the second coming, but as the faction of believers grew to 50,000 nationwide, the pressure mounted. Miller’s first prediction was vague: “sometime between March of 1843 and March of 1844.” When that passed without incident, he went back to the good book with renewed vigor.

"There was a sort of recalibration and the date October 22, 1844 was identified as a sort of all-or-nothing Millerite bet," Holland said.

And just like every “end-times” prediction before, and every one since, it was a bet they lost.

"The devastation that hits is really hard to capture: grown men weeping like children and people profoundly traumatized by this disappointment, questioning God’s existence, questioning the Bible’s validity, these anchor points for their entire sense of themselves," Holland said.

The Millerite movement was no more. It would become known as the Great Disappointment. Some found refuge with the Shakers and the Quakers. Others, like Ellen White, picked up the pieces, and launched a new movement.

"Ellen White began to have a series of visions in which the Lord guided her toward an explanation of the great disappointment and she became one of the pieces around which a new religious movement formed that came to be known as the seventh day Adventists," Holland said.

Today, the Adventists are an international church of some 18 million — and growing. They run hospitals around the world and universities across the U.S. One, Ben Carson, is even running for president.

And while it’s pretty easy to look back today and scoff at the Millerites naiveté, Holland says that by doing so, you might just miss a pretty important point.

"That idea that the human story has a structure to it, has a narrative, has a happy ending for those who have played it right — that’s a message that still resonates with a lot of people," he said.

The Great Disappointment, when tens of thousands of believers were crushed, and the Adventist movement was born, happened 171 years ago this week.