MORE ON:

In 1996, Peter Larson reported to a federal prison in Colorado — the same mean lockup where Timothy McVeigh and John Gotti were being held — to begin serving a two-year sentence. As he checked in, the guard noticed something strange on Larson’s paperwork. The prisoner’s offense? “Failure to fill out forms.”

Sounds crazy, but it’s true. Larson, a mild-mannered South Dakota paleontologist, went to prison for nearly two years because he improperly filled out a customs form.

The whole bizarre story is chronicled in the new documentary “Dinosaur 13,” opening Friday and directed by Park Slope filmmaker Todd Douglas Miller. The saga spans nearly a decade and involves double dealing, an allegedly stolen dinosaur and the largest criminal prosecution in South Dakota history.

It begins back in 1990, when fossil hunter Susan Hendrickson noticed something sticking out of the side of a Badlands hill. It turned out to be a dinosaur bone. Hendrickson reported her discovery to her colleagues at the Black Hills Institute, a private, for-profit fossil company co-founded by Larson.

After weeks of digging in the 110-degree heat, Larson and his crew saw what they had: the largest, most complete and best preserved Tyrannosaurus rex ever found. The 40-foot beast, the 13th T. rex discovered, was named “Sue” in Hendrickson’s honor.

“Like most kids, the T. rex was my favorite dinosaur growing up,” Larson tells The Post. “Sue is my first love and my best love.”

Paleontologist Peter LarsonPhoto: Wireimage

The bones were pulled from the ground and taken to the Black Hills Institute lab nearby to undergo years of cleaning. Soon, word began to spread of the big discovery, and the Institute — located in the small town of Hill City, South Dakota — became inundated by curious visitors from around the world. Then, on May 14, 1992, a swarm of more than 30 FBI agents and members of the National Guard swooped in and confiscated Sue, claiming she had been stolen from government land.

Here’s where things get complicated. The fossil had been discovered on the ranch of a local man named Maurice Williams. He was of Indian descent and his land was held in trust by the US government. Although Williams sold Sue to Larson for $5,000, the government was claiming that the rancher needed its permission.

“There was a lot of politics involved,” Miller tells The Post. “Everything just boiled over.”

After many months of legal wrangling and a long trial, a court eventually ruled that Sue rightfully belonged to rancher Williams, who was now claiming he never sold the bones to Larson, even though he was captured on video doing so.

In 1997, Williams auctioned the skeleton via Sotheby’s in New York for $7.6 million — the most ever paid for a dinosaur fossil. (The buyer was the Field Museum in Chicago, where Sue now resides.) The government wasn’t yet done with Larson and his colleagues, though. The diggers were put on trial — oddly, not for anything involving Sue — but for supposedly removing other fossils from government land.

A six-week court case followed during which the prosecution tried to pin 146 felony counts on Larson and the Black Hills Institute. In the end, only two stuck, and Larson was convicted of failing to declare more than $10,000 in traveler’s checks after returning from a Japan sales trip.

He expected parole but got two years in a federal pen.

Since his release, Larson has returned to hunting fossils and has discovered 10 more T. rexes, though it’s Sue that still holds the most special place in his heart.

“I’ve been to see her [in Chicago] more than a dozen times,” he says. “I got to kiss her on the mouth before we left.”

Careful. You might get prosecuted for a code 163 — unnatural romance with a dinosaur.