It lasted 11 games. It was confined to 19 days. It spanned two countries and four cities, and there was a moment in the middle there when you started to wonder if your eyes were playing Jedi mind tricks on you.

These things simply don’t happen, not in professional sports, not in the 21st Century, not when basketball players are first spotted as fifth-graders, their every move thereafter painstakingly recorded and charted and filmed and digested. You can’t simply drop out of the sky, like some basketball Sidd Finch (only real). Doesn’t happen. Can’t happen.

And yet Linsanity happened.

It’s a matter of record. It’s a matter of history. It’s a matter of memory. It was a stretch of excellence that a basketball-starved city embraced as it would a long-lost son, one it still recalls fondly even as the star of that unparalleled show, Jeremy Lin, sits in street clothes on the other side of the Manhattan Bridge, an eternal reminder of how fickle these things can be.

Five years somehow have passed since Linsanity overtook Madison Square Garden, overwhelmed New York City, overhauled the imagination of Knicks fans who were looking for something, anything, they could believe in. Next Saturday, in fact, will mark exactly five years from the moment Lin tore off his warm-ups at the Garden, hopped to the scorer’s table, and checked in for Iman Shumpert with 3 minutes and 35 seconds left in the first quarter of a game with the Nets.

It was a wrinkle in time that still can take your breath away once you realize, all over again, that this wasn’t a fantasy. This was real. This happened.

This is what it was like:

Part One: Linvincible!

That was The Post’s first back-page pun, though it was only a “trace” — a secondary box at the top of the page, teasing a story inside — on Sunday morning, Feb. 5, 2012. There was a good reason for that: Jeremy Lin could have scored 100 points the night before and the big story was still going to be the Giants playing the Patriots in Super Bowl XLVI later that day.

Still, as these things go, that was an awfully interesting oh-by-the-way. The Knicks entered the game 8-15 for the lockout-shortened season. They were playing a third straight night and already had lost the first two. They would fall behind 30-18 in this one. They desperately were awaiting the arrival of a point guard they believed held the key to turning the whole season around.

But it wasn’t Jeremy Lin.

It was Baron Davis.

“We want when he comes back he could stay back and not risk the in-and-out and all that stuff,” Knicks coach Mike D’Antoni said of Davis, who had yet to don his No. 85 jersey.

Then Lin came in, he shot 10-for-19, scored 19 of his 25 points in the second half, he handed out seven assists, he completely dominated the Nets’ Deron Williams. Before long the Garden was chanting “JER-E-MEEEE!” and “M-V-P!” and the Knicks were enjoying a 99-92 win, and Lin was shaking his head after the game, as surprised as anyone.

“The night hasn’t sunk in yet,” he said. “I’m kind of shocked by everything that happened. I’m trying to soak it all in.”

D’Antoni, who believed he was a day or two away from getting fired, immediately suggested Lin was his new starting point guard, which was remarkable when you consider that for most of the year Lin was the team’s fifth option at that position — behind Toney Douglas, Mike Bibby, Shumpert and Davis.

“We’ve got to go back to that well,” he said.

Others weren’t quite so sold.

“I think,” Nets coach Avery Johnson said, “he’ll have a good day at church tomorrow.”

But over the next two games, Lin hinted that his Saturday night Garden special wasn’t a fluke. In a 99-88 home win against the Jazz, he shot 10-for-17, scored 28, and handed out eight assists. Two nights later, in Washington, he had 23 and 10 assists in outdueling the Wizards’ John Wall.

That last game especially was notable because the Knicks were without both Amare Stoudemire, who was tending to a death in the family, and Carmelo Anthony, sidelined with a groin injury. And also because Lin dunked on a breakaway, causing the sellout crowd at Verizon Center to explode in a frenzy.

“Indescribable,” Lin said. “I don’t think anyone saw this coming, including me.”

Steve Nash gushed on Twitter: “If you love sports you have to love what Jeremy Lin is doing. Getting an opportunity and exploding!!”

Quoth the Post: ALL-LIN!

Part Two: the Peak

Lin already was blowing up the Garden’s box office. In a wonderful scheduling quirk, the Knicks would play five of their next seven games at home, and the secondary ticket market already was commanding upwards of 40 percent mark-ups for tickets that, a week earlier, they were lucky to sell for $5.

First up were the Lakers, in the first phase of decline but still formidable, and still boasting Kobe Bryant — suddenly the No. 2 drawing card of the night, and none too happy about that.

“I know who he is but I don’t really know what’s going on too much with them,” Kobe said the night before, in Boston, amazed that somehow this kid, Lin, had upstaged even a Lakers-Celtics game 200 miles away. “Honestly, I don’t even know what he’s done.”

He would find out. Soon. It wasn’t just that Lin scored 38 that night — four more than Kobe — it was how he scored them, and when. Every time Bryant tried to nudge the Lakers close, Lin would answer. Sometimes outside. Sometimes inside. Always — always — accompanied by the roar of 19,763 acolytes who now believed Lin capable of just about anything as he finished off a 92-85 win.

The Post was convinced: “LINSTANT KARMA!”

And so was Kobe.

“Kids should look up to him,” Bryant said, duly impressed and truly amazed. “See what hard work can do.”

The Knicks had won four games in a row. D’Antoni — being fitted for a gangplank less than a week earlier — was being hailed as “the perfect coach for the perfect player.” And the roll continued. In Minnesota the night after the Lakers game, Lin inched back to earth — shooting 8-for-24 — but his free throw broke a 98-all tie with 4.9 seconds left.

“JEREMY WIN!” noted The Post.

Three nights later, in Toronto, came the first tangible evidence of just how big this phenomenon had gotten. No longer could Lin talk to reporters in a locker room; from now on, there would be formal press conferences. The number of international media jumped significantly. And it seemed the Knicks would finally succumb to the laws of probability, trailing by 12 early in the fourth quarter and by nine, 86-77, with four minutes to go.

Then, down 87-84 with 1:12 left Lin — struggling all night with his shot, eight turnovers to mostly cancel out 11 assists — drove, knocked down a short jumper, was fouled, and tied the game with a free throw. One stop and one offensive rebound later, he squared up from 25 feet, and when the ball splashed through there were just nine-tenths of a second left. Knicks 90, Raptors 87.

“I don’t know when this will end,” D’Antoni said. “Hopefully never.”

Quoth the Post: “LINTERNATIONAL SENSATION!”

Part Three: the Denouement

D’Antoni only was saying what everyone secretly knew: Not even Michael Jordan was Michael Jordan every night of his career. This couldn’t last forever … even as Garden tickets spiked beyond belief, even as Lin led highlight shows every nights (and the “Nightly News” one night) even as the U.S. Patent and Trademark Office in California was besieged by folks wanting to copyright “Linsanity.”

The Knicks’ winning streak reached seven — and their record .500, at 15-15 — on Feb. 15 when Lin scored just 10 but dished out 13 assists. New Orleans halted the good times two nights later with an 89-85 win (despite Lin’s 26). The meat of Linsanity would last for three more games, culminating with a 99-82 win over the Hawks on Feb. 22 that featured a workmanlike 17 points and nine assists for Lin.

But its final loud, mad rush came on a Sunday afternoon three days earlier, when Lin squared off with Dallas’ Jason Kidd — like Lin, a Northern California native whom Lin had grow up idolizing. The Knicks ransacked the defending champs that day, 104-97, and Lin had 28 points and 14 assists (to Kidd’s 8 and 4).

“He has taken to D’Antoni’s offense, and he looks a little bit like Steve Nash out there,” Kidd marveled afterward. “It is a point guard’s dream.”

Those words were immediately related to Lin. It took three days for the smile to wear off.

The Post? This one needed a front page and a back page. “LINTENSE!” to go along with “LINFECTIOUS!”

And then … it was over.

In memory it feels like a plug being kicked out of a wall. In memory, the scene was Miami and the date was Feb. 23, and the Heat did everything but hog-tie Jeremy Lin that night at American Airlines Arena. Actually, that part is true: He shot 1-for-11, turned the ball over eight times, and the Heat — who made no secret that they were tired to death of Linsanity — clobbered the Knicks, 102-88.

In truth, it was more subtle than that. During Linsanty’s 11 games, Lin averaged 23.9 points and 9.2 assists, shot 50 percent from the field, 39 percent from 3-point range. In the 14 games beginning with Miami that closed his season, it was 14.5 points, 6.5 assists, 39 percent overall, 29 percent from 3.

Not awful numbers.

But not Linsane ones, either.

The Miami game was the first of a 1-7 stretch that finally cost D’Antoni his job. Mike Woodson replaced him, he refocused the offense on Anthony and Stoudemire, went 18-6 down the stretch, and de-emphasized Lin — who would hurt his knee and, famously, miss the Knicks’ five-game playoff loss to Miami. Soon enough the Knicks would refuse to match the poison-pill offer sheet Lin would sign with the Rockets.

And Linsanity would fade, permanently, to the yellowing scrapbooks of memory. Sometimes, it really is hard to believe it happened. Five years ago this week, it happened, and if you were there, if you saw what it was like, heard what it was like … well. You know.

You know it was Lincredible.