The NYPD has laid down the court-mandated law for conducting “stop-and-frisk” searches — and the rules are so restrictive that cops should “travel with an attorney,” the head of the largest police union said Tuesday.

An official NYPD memo says cops can no longer stop and frisk people for making “furtive movements” or because they’re hanging out in a “high-crime area.”

Also banned is stopping anyone based on a hunch or because they match “a generalized description of a crime suspect, such as an 18- to 25-year-old black male,” according to the memo.

The new rules are the result of Manhattan federal Judge Shira Scheindlin’s controversial 2013 ruling that found the NYPD’s use of stop-and-frisk was illegally targeting minorities in violation of the Constitution.

In addition to the restrictions on stop-and-frisks, the memo spells out how they should be conducted: “A frisk is limited to a pat-down of the outer clothing of the subject to determine if the suspect has a weapon.”

“Police officers are going to have to travel with an attorney just to interpret these new stop-and-frisk regulations,” Patrolmen’s Benevolent Association president Pat Lynch said.

“Once again, the department and courts are putting responsibility for the problem that they created with illegal activity quotas on the shoulders of our members.”

“The end result is making a difficult job more difficult and dangerous for members,” he added.

The head of the Sergeants Benevolent Association, Ed Mullins, also blasted the new rules as “an indirect presumption of wrongdoing” by cops.

He also said they would lead to “hesitation — and potentially an avoidance of duties — in order to not fall victim to unjustified criticism or discipline.”

“My prediction is we’re going to see an increase in shootings and homicides [like] we haven’t seen in years, once the weather gets warmer,” Mullins said.

“Since the spotlight of criticism has been placed on stop-and-frisk, we’re now seeing a spike in shootings and homicides. I think there’s a correlation because the criminals know the police are not going to be as proactive in pursuing them.”

The four-page set of reforms also includes a requirement that cops fill out new forms justifying any stops they make.