In the mythical world of “Magic: The Gathering,” a place ruled by goblins, dragons, wizards and spells, there is nothing more precious to a serious player than their “deck” — the 60 select playing cards wielded among competitors like swords in battle.

A powerful deck with first-edition cards and artist autographs can take years to amass and fetch thousands of dollars. A single, signed Black Lotus card — the Holy Grail among “Magic: The Gathering” collectors — will cost you as much as $29,000 on eBay right now.

Having your deck stolen — apparently, not an uncommon occurrence at Magic tournaments — does not merely represent a financial blow to victims; it’s a potentially devastating personal setback as well.

This explains why Kemper Pogue, a 23-year-old Magic fanatic from Woodbridge, Va., had the following reaction after thieves broke into his car last week and swiped 300 prized playing cards worth about $8,000:

“I went in the house, cracked open a beer, had a few sips and promptly started screaming expletives as I waited for the police to arrive,” he told The Washington Post. “I’d been collecting these cards since I was a kid and over the years they’ve only increased in value.

“I was horrified.”

He was also furious.

After filing a police report, Pogue decided to do what a Magic character like Garruk Relentless might do, and hunted down his enemies with dogged ferocity — sans the battle axe.

He started by posting a detailed message on Facebook to alert friends in the Magic community about the theft. Then, he began calling stores in Northern Virginia and Maryland that specialize in selling Magic trading cards.

Unless the thieves were big fans of the game as well, Pogue figured he knew something that the perpetrators didn’t: Despite its rapidly growing ranks, the Magic community is not only fanatical and obsessive, it’s also a tight-knit, nerds-only clubhouse, where information about players and cards circulates quickly via regional shops, tournaments and online forums on Reddit and elsewhere.

“There aren’t many physical things that can be taken that has this much sense of community attached to them,” Pogue said. “Cards have all these memories and conversations with them from people you’ve met all over the country. When Magic players hear that a collection has been stolen, it’s heartbreaking and they rally around each other to get it back.”

The Hasbro game, invented in 1993, doesn’t exist in some extra-obscure corner of the basement-dwelling gaming community. It’s a $250 million-a-year brand with about 20 million players and fans worldwide. And those players are very, very passionate about their cards.

Craig Cunningham, a Prince William County police detective who worked the case, said he knew about Pokemon, but he’d never heard of “Magic: The Gathering” and was shocked to learn, upon Googling, how much the cards might be worth. Cunningham doesn’t think he was the only one who underestimated the cards’ value.

“I don’t think the bad guys ever realized how much value they were working with,” the detective told The Post. “We’re talking about cards that are expensive and rare. You can’t just get rid of it at a pawn shop because that’s too dangerous.”

Not understanding their merchandise would prove to be their undoing. The first break arrived a day later from a card store in Virginia, where an owner — a friend of Pogue’s — reported that two men had come in hoping to sell cards matching the description of Pogue’s collection, police said. The men seemed like novices hawking stolen merchandise, the owner thought, so he redirected them to a popular gaming store in Springfield called Curio Cavern, where Pogue happens to be a regular.

The two men showed up at the Springfield location — in Fairfax County — the next afternoon and were met by a store employee already on the lookout for the suspected thieves, Pogue said. The men told the employee they wanted to make a deal, but he noticed that they only had about a third of the allegedly stolen cards in their possession, store owner Tom Haid told The Post.

The employee, hoping to buy some more time and retrieve the rest of Pogue’s collection, asked the pair to return that night, at 8, to make a deal with his boss.

The men reluctantly agreed.

With Haid, Pogue and police working together, an elaborate trap was laid that evening at Curio Cavern. Two plainclothes Fairfax County police officers would wait inside the store while more officers would be positioned in the parking lot.

A sign saying “Be Back in 5 Minutes” would be placed on the establishment’s front door to keep the suspects from entering the building. Hiding in an unmarked vehicle, the employee who had previously interacted with the men would then attempt to verify their identities so police could surround them to make an arrest.

It would be, Pogue said, the ultimate “revenge of the nerds” scenario. But two obstacles remained: Police informed Haid, the shop owner, that one of the suspects had a criminal history that included robbery with a deadly weapon. There was a chance, authorities said, that the man might be armed or attempt to rob the business.

Further complicating the sting was a 20-person Magic tournament scheduled to take place inside the building that evening. But with no guarantee they’d ever see the suspects again, an increasingly nervous Haid said he approved the operation.

At 7:30 that night, as engrossed Magic players chatted quietly at several tables inside the building, Haid made an announcement.

‘There is a pair of dangerous criminals with a history of armed robbery on their way to the building,” he told the group. “You all are welcome to leave, but if you’re worried, right now is the time to get out of Dodge.”

What happened next nearly brought Haid to tears as he recounted it over the phone several days later: Nobody moved.

“We had people here who have had their collections stolen at major events and it sucks,” he told The Post. “It’s overwhelming at times and they understood immediately how important it was for this operation to happen and for the community to have a record of it.”

When the men showed up about 30 minutes later, the ruse worked to perfection, he said. Rebuffed by the sign, the men took a seat on a bench beside the front door with the stolen card collection in hand. And they waited.

Haid said the next thing he heard was the sound of dogs barking and voices yelling at the men to get on the ground. Fairfax County police officers who had been hiding in unmarked vehicles and behind the store streamed into the parking lot with weapons drawn.

“From what I understand, they had at least 10 guys out there plus a canine unit,” Cunningham, the police detective from Prince William County, told The Post. “They were well-prepared to take these guys down and it went very smooth.”

Fairfax police declined to comment on the case.

Pogue, who had left town for a funeral and was not present for the sting, heard the good news a few minutes later when a friend at the store sent him an exultant text that the men had been captured.

Solomon Dyonne Reed, 20, of Woodbridge, has been charged with felony possession of stolen property with intent to sell, according to Fairfax County General District Court records.

Cunningham said Reed has also been charged with grand larceny in Prince William County, where the theft occurred.

The other man who came to the store was not charged; investigators don’t believe he was involved in the theft of Pogue’s cards.

Those precious cards remain in a Fairfax police evidence room, but Pogue said he expects to have them back in his possession soon.

Until then, he’s hoping his victory makes criminals think about targeting people who spend their free time playing an elaborate card game marked by casting spells, outwitting opponents and vanquishing foes.

“We burned ’em!” he said. “We were one step ahead every step of the way.”