It was one of the most bizarre Oval Office meetings in the history of the country.

Check that. I’m gonna go ahead and lay claim to it as THE most bizarre Oval Office meeting ever. Your votes otherwise are welcome.

The year was 1970. The era of Vietnam, the counterculture, hippies, rebellious rock ‘n’ roll, campus protests, “women’s lib,” the emergence of marijuana and LSD …

President Richard Nixon, the squarest of the squares, hunched over and simmering with resentment and insecurity even as he occupies the highest office in the land, agrees to take a meeting with Elvis Presley, who was still one of the biggest stars in the world but was in his full-on “King” phase: heavily sprayed hair, muttonchop sideburns, gold-rimmed sunglasses, black cape, unbuttoned shirt, velvet bell bottoms, oversized gold necklace, a bejeweled belt buckle worthy of a heavyweight champion, and an obsession with karate, guns and law enforcement.

Perhaps the only thing the two men had in common was a shared feeling the country was going to hell in a handbasket.

How was this not a movie before now?

(Granted, there WAS a 1997 made-for-TV “mockumentary,” with Rick Peters as Elvis and Bob Gunton as Nixon. Missed that one. And on the Comedy Central series “Drunk History,” Jack Black was Elvis and Bob Odenkirk was Nixon.)

The good news is, it was worth the wait. “Elvis & Nixon” is one of the most entertaining movies I’ve seen this year — a whip-smart slice of strange history bolstered by pitch-perfect period-piece references, two excellent, offbeat performances and a brisk sense of pacing. Even the screenplay credits are appropriately surreal. The script is credited to Hanala and Joey Sagal — and Carey Elwes, the actor best known for “The Princess Bride.”

It’s the next best thing to having been a fly on the wall when the REAL Elvis/Nixon meeting took place.

Michael Shannon is hilarious as Elvis because the actor never once tries to BE hilarious. His Elvis is fully aware of the effect he has when he walks into a room or takes the stage in Vegas; he’s been arguably the most famous entertainer in the world for a decade and a half.

He’s also a bit bonkers. Elvis gets so agitated watching the news on the wall of TV’s in Graceland, he takes out a gun and fires away at the screens until there’s nothing but silence.

After a quick jaunt to Los Angles to recruit the services of his childhood friend and former right-hand man Jerry Schilling (Alex Pettyfer), Elvis wings his way to Washington, D.C., where he shows up uninvited at the White House and attempts to deliver a handwritten letter to Nixon, in which he voices his concern over the drug problem in America and requests a meeting with the president so he can volunteer his services as an undercover agent in the Bureau of Narcotics.

Again: This really happened.

Colin Hanks and Evan Peters are excellent as Egil “Bud” Krogh and Dwight Chapin, respectively, two White House aides tasked with convincing the president he should actually meet with “this rock and roller” (as Nixon calls him) because it would be good for Nixon’s image with the young and with women, most of whom basically loathe him, according to the research. (Krogh and Chapin come across as likable, somewhat Stooge-like figures in “Elvis & Nixon.” In real life, both served time for their roles in the Watergate scandal.)

Kevin Spacey, already spending a lot of time in a faux Oval Office as Frank Underwood in “House of Cards,” seems like almost too easy a choice to play Nixon — but there’s nothing wrong with casting greatness, and Spacey doesn’t disappoint.

Like Shannon, Spacey doesn’t look all that much like the famous historical figure he’s portraying, nor does he attempt to do a full-on comedic imitation. The work is subtler, slyer, more brilliant than mere impersonation. With every casual expletive, every hand gesture dismissing an underling, every roll of the eyes, Spacey builds one of the best Nixons ever captured onscreen.

It’s a comedy of setbacks and errors until Elvis is finally ushered into the Oval Office to meet with Nixon. Once it’s just the two of them in the room, it’s pure magic, with Elvis helping himself to the president’s personal M&Ms and Dr. Pepper, and Nixon placating this court jester so he can get an autograph for his daughter.

Until Elvis starts stating his case in earnest, and Nixon finds himself nodding rapidly in agreement and thinking: Maybe I SHOULD give this Elvis fellow a badge.

My complaints with “Elvis and Nixon” are minor.

The story is told mainly from the viewpoint of the Presley camp; Nixon is absent from the proceedings for considerable chunks of time. More Nixon! Also, every time we took a detour into a subplot about Jerry’s torn loyalties between his friend Elvis and his girlfriend back home, I was tapping my toes and waiting for the Elvis/Nixon story to kick back into gear.

With a running time just under an hour and a half, “Elvis and Nixon” has only a very few slow moments. For the bulk of the ride, it’s a wickedly funny interpretation of the one of the great confounding moments in American pop culture and political history.

★★★1⁄2

Amazon Studios and Bleecker Street present a film directed by Liza Johnson and written by Joey Sagal, Hanala Sagal and Cary Elwes. Running time: 87 minutes. Rated R (for some language). Opens Friday at local theaters.