The NYPD has turned to Patrick Swayze to teach city cops how to behave.

Police bosses are using a scene from the 1989 action flick “Road House” as part of the mandatory, three-day retraining course for 22,000 cops, The Post has learned.

“You have to have a thick skin,” an instructor told cops forced to take part in the $35 million program before hitting play on the two-minute clip from the cult classic, sources said.

In the scene, Swayze — playing a tough-guy bouncer, Dalton — teaches his goons at the rowdy bar Double Deuce how to handle unruly customers.

First, he spells out three rules, with the third being simply, “Be nice.”

“If somebody gets in your face and calls you a c–ksucker, I want you to be nice. Ask him to walk. Be nice. If he won’t walk, walk him. But be nice. If you can’t walk him, one of the others will help you, and you’ll both be nice,” he says.

“I want you to remember that it’s a job. It’s nothing personal.”

When another bouncer in a cut-off plaid shirt asks if “being called a c–ksucker isn’t personal,” Swayze responds: “It’s two nouns combined to elicit a prescribed response.”

“Well, what if somebody calls my mama a whore?” the other bouncer asks.

“Is she?” Swayze answers to chuckles from the group.

The scene also includes Swayze’s most important message: “I want you to be nice, until it’s time to not be nice.”

“Well, how are we supposed to know when that is?” asks a mush-mouthed bouncer with a big black eye.

“You won’t. I’ll let you know,” Swayze says.

The clip had the audience at the Police Academy smirking and stifling laughter.

“It’s just ridiculous, the stuff they’re showing us,” the cop said. “It’s crazy. They’re showing us something from a movie and they want us to act like that in real life. It’s not realistic — it’s Hollywood.”

The use of “Road House” as a training tool was revealed after The Post exclusively reported that the lecture portions of the sessions were so boring that many cops have been falling asleep in their seats.

Cops also told The Post that they were told to “take a step back, close your eyes and take a deep breath” when dealing with angry people, despite the potential danger in that advice.

Mayor Bill de Blasio on Monday tried to downplay those reports as coming from “some disgruntled individuals,” and insisted that the retraining program — ordered after the police chokehold death of Eric Garner — was “going to have a transcendent effect.”

An NYPD spokesman also claimed that cops “are not being trained to shut their eyes while in a possible confrontation situation.”