They played all night.

At one end of the World Series of Poker table: Jacob Balsiger, a 21-year-old political-science major at Arizona State. At the other: Jesse Sylvia, a 26-year-old poker pro from Martha’s Vineyard. And in the middle, in a Baltimore Orioles jersey, sat Laurel’s very own Greg Merson, a 24-year-old University of Maryland dropout who’d overcome drug addiction and parental doubts to reach poker’s premier event in Las Vegas.

For a record 12 hours this week at the tournament’s final table, Merson battled and baffled Balsiger and Sylvia. He was up, then really up, and then he was down, and then up again — a poker roller-coaster ride.

Through it all, Merson was the Lincoln Memorial of professional poker players: inscrutable, unflappable, stone-faced. He unfolded his arms only to move chips or cards.

As Tuesday night became Wednesday morning, with the sun creeping up in Las Vegas, Merson locked in on the adversaries to his right and to his left. He knocked out Balsiger after the plaid-shirted student went all-in. And then, in their 17th head-to-head hand, Merson ratcheted up the pressure: He went all-in against Sylvia.

And won.

Confetti rained down from the ceiling. Lights flashed. In hand number 399, on national television, the dropout got the last laugh.

Merson’s haul: $8.5 million in cash stacked on the table, the Player of the Year award and a $150,000 gold bracelet, which he promptly placed on his mom’s wrist. He hugged his parents tightly, and he cried.

“We didn’t say a lot,” said Merson’s father, Stan. “We were both crying. Greg was crying. I don’t know how else to describe it. It was just one incredibly emotional minute.”

Greg Merson was stunned.

“It’s absurd,” he told ESPN TV. “It doesn’t even feel like real life.”

Merson’s odyssey from typical suburban kid — his father is a corporate executive, his mother is a teacher’s assistant — to world-famous poker kingpin began at Reservoir High School, when he joined his brother and his friends for a basement poker game.

Merson had watched tournaments obsessively on ESPN, and when he finally got a chance to play, he was smitten.

Before leaving for the University of Maryland, the straight-A student deposited $100 in an online poker account. But Merson’s winnings soon began funding a more dangerous game: drugs. First marijuana, then cocaine. Merson says he got high between classes and even before tests. He lost his straight-A pedigree. He also lost 25 pounds.

Merson somehow hid his addiction from his parents, but they didn’t hide their disappointment five years ago when he told them, after just 21 / 2 semesters, that he was quitting college to play poker full time. They thought he was crazy.

He moved to Atlantic City, got clean and, after an online poker crackdown in the United States last year, moved to Toronto to play legally.

In February 2011, he relapsed. His addiction almost ended his career. And his life.

“I was down about half of my net worth,” Merson said one afternoon at a sports bar near his home before leaving for Vegas. “To watch it go so quickly . . . it was terrible.”

He detoxed himself 10 months ago in a Las Vegas hotel room, vomiting and shivering for days but vowing to get his life and his cards in order.

“It sounds like a cliche and it’s cheesy, but it’s really true: Anybody who is really, really, really close to me knows that poker saved my life,” he said. “I can’t be more thankful that it was there for me.”

And then he went on a roll, morphing from a relatively unknown online player to a who-is-that-guy professional in tournaments and cash games. Merson entered the WSOP’s Main Event having won more than more than $1 million in 2012. He picked up a huge Twitter following. Even Olympic swimming legend Michael Phelps became a fan. Earlier this week, Phelps said on Twitter: “Wishing @Gregy20723 good luck!! Sorry can’t be there kid!!”

Play at the final table, televised on ESPN, began Monday with the nine remaining players from more than 6,000 who started the Main Event in July. Nearly 100 of Merson’s family members and friends were in the audience at the Penn & Teller Theater at the Rio Hotel, cheering, “Gregy! Gregy!” Some held signs with enormous pictures of Merson’s face.

The table was whittled down to the final three players for Tuesday night’s action, with Merson up 26 million chips on Sylvia and 44 million on Balsiger. Merson started hot, winning the first seven of eight hands. He played quick and aggressive, in striking contrast to the lack of movement, emotion or eyeball activity behind his sunglasses. (He recently took up yoga.)

But Balsiger and Sylvia were not patsies. They wouldn’t go away. And the three battled back and forth, taking a 10-minute break every two hours.

Merson’s best hand came early Wednesday, when he bluffed Balsiger, who had put up more than 13 million chips, by going all-in when he only had a queen-jack with a 9-8-3-4-6 showing on the table.

Balsiger, who had a queen-10, quickly folded. The Las Vegas Sun later called Merson’s move “the bluff of the year.”

Balsiger was eventually eliminated, taking $3.8 million in third-prize winnings back to Arizona State. That left the two pros: Merson and Sylvia. About 8:45 a.m. Maryland time, 12 hours after play began, Merson was dealt a king-5. Sylvia pulled a queen-jack. There was a betting war, and Merson went all-in. Sylvia thought about it a while, then called.

It was all on the line now. Merson’s body actually showed movement. He even flashed a nervous smile. Sylvia stood up and walked around.

And then the community cards were dealt: 9-6-3-6-7.

Merson, with the king high, won.

His friends and family rushed to the floor as the confetti streamed down.

“Greg Merson is the new Main Event champion!” the ESPN announcer said.

“He cleared so many hurdles on and off the felt to make this final table and now has announced himself as one of the game’s bright stars.”

“What a beast, Greg Merson,” another announcer said. “What a beast.”

Merson’s father said his son, physically and emotionally drained, promptly went to his room to attempt to sleep. In coming weeks, his son will ramp up a sponsorship deal just signed with poker legend Phil Ivey. He’ll move into a condo he just rented near George Washington University. And he’ll continue his career as a pro poker player — a not-so- crazy idea, after all.

“I guess,” his father said, “he proved me wrong.”