A Manhattan judge has a message for Madonna: stop messing with your neighbors.

Manhattan Supreme Court Justice Gerald Lebovits said the pop superstar was “merely harassing” fellow residents of her Upper West Side co-op for continuing to seek records from the board after she lost a legal bid challenging a rule that required her to be physically present in her $7.3 million pad when any of her family or staff are there.

She wanted access to board records including voting information and annual meeting minutes to “investigate how her lease was changed” and “how her family may use Unit 7A without breaching the lease.”

“Plaintiff does not need those materials anymore to prove a case that, by law, she is no longer allowed to prove,” Lebovits wrote in the decision released Friday.

Madonna sued Harperley Hall on West 64th Street and Central Park West in 2016 — two years after the board changed her original proprietary lease to say that her children and domestic help cannot live in the unit unless she herself is “in residence” at the time.

“Plaintiff is a world-renowned recording artist, performer and singer who is constantly on world tours,” she griped in her 2016 suit.

“As such, plaintiff owns many residences around the world and travels extensively worldwide,” she said in court papers.

Last September, Lebovits said she waited too long to sue and tossed the claim challenging the new lease.

Now he’s also tossing her demand for co-op records, saying that issue is moot.

Lawyers for Madonna and the co-op board did not immediately return messages seeking comment.

This article originally appeared in the New York Post.