Play nice, guys.

That essentially was the directive given to owners James Dolan of the Knicks and Mikhail Prokhorov of the Nets this past season during a meeting orchestrated by NBA Commissioner David Stern, who wanted to snuff any lingering tension between the two and prevent a full-blown feud, multiple league sources told The Post.

“There was such a meeting and the parties both said it was a very cordial and pleasant one,” said one league official with knowledge of the sit-down, which happened early in the season.

The official also confirmed Stern assisted in getting the pair together in an attempt to prevent a wave of spitballs going back and forth over the Brooklyn and Manhattan Bridges.

See? It’s not just players like Paul Pierce and Raymond Felton fueling the feud between the two NBA teams sharing the city. It has been going on for a while, but the Nets no longer are the poor stepchild performing in a New Jersey swamp.

Another person with direct knowledge of the sit-down called it “cordial and friendly.”

Spokespersons both for Prokhorov and for the Knicks said “no comment” regarding the meeting.

One source maintained Prokhorov stokes the rivalry fires because he believes the feud “is great for both teams” and insisted it is “not at all personal” against Dolan, the Garden chairman and Cablevision CEO.

One July morning in 2010, Knicks Nation awoke to a Godzilla-sized rendition of Prokhorov and then team advisor and minority share owner Jay-Z plastered on the side of a building near Madison Square Garden proclaiming a “Blueprint for Greatness” as the Nets readied their move from New Jersey to Brooklyn.

According to several sources, Dolan was furious about the 22-story, 21,375 square-foot billboard and called league officials to complain, a tactic he repeated last year after Prokhorov referred to him as “that little man” in a New York Magazine article.

Enough, said the league. Is this any way for the two New York teams, who plan to share the 2015 All-Star Game, to act? So the league wanted the two men in the same room in an attempt to squash any lingering animosity and to prevent additional hostility. Enter Stern.

At the press conference announcing the acquisitions of Kevin Garnett, Pierce and Andrei Kirilenko last month, Prokhorov gave only a veiled dig at Dolan, saying, “he’s watching us for the time being.”

Others haven’t been so reserved.

Pierce has gone on a personal mission, it seems, to repeatedly proclaim his hatred of all things Knicks. He lamented how “nobody really respected” the Nets for so many years and said Brooklyn can wrest the favor of the city from the Knicks.

Not so fast, fired back Felton, the Knicks point guard who confidently said “at the end of the day, we’re still New York’s team.

“We’re not worried about the Brooklyn Nets,” Felton said. “We’re worried about the New York Knicks.”