Rex USA 1 / 11

Madonna is used to having things her way -- but it appears if an upscale Upper West Side co-op board is trying to stop that from happening.

Just as her custody battle over Rocco Ritchie ended, the Material Girl filed a lawsuit against the board of the Harperley Hall co-op, a ritzy building located at West 64th Street and Central Park West, in April. The chart-topping singer sued the board for trying to enforce a rule that requires her to be "in residence" at the $7.3 million home when any members of her family or staff are staying there. But now the building's lawyers are hitting back and asking the judge to throw out the suit, according to Page Six.

Madonna's court papers from April read, "Plaintiff is a world-renowned recording artist, performer and singer who is constantly on world tours."

The civil suit went on to say, "As such, plaintiff owns many residences around the world and travels extensively worldwide."

However, the building's lawyer, Patrick Sweeney has just asked a judge to dismiss the suit, claiming that Madge cannot, "Credibly claim she was treated any differently from every other shareholder."

Sweeney also states that the "Celebration" singer says that Madonna waited too long to file the lawsuit against the building -- two years after the rule was enacted. On the other hand, Madonna says she wasn't aware of the rule until November 2015 (sorry ignorance doesn't work in the eyes of the law, Madge!). Sweeney states that even if that were true, the pop star waited, "More than four months before she commenced this action."

Madonna bought one part of the three-unit apartment with her ex husband Sean Penn back in 1986 while they were still married, according to Architectural Digest.

The "Hung Up" singer then bought the second unit six months after their divorce in 1989 and then she purchased the third unit -- which constitutes the back sitting room and bathroom -- six months later.

Now integrated into one luxurious seventh floor apartment, the pad was designed by her younger brother Christopher G. Ciccone.

Amazingly enough this hotly dispute home isn't her main Big Apple apartment -- her primary residence in NYC is a $32.5 million, triple-wide town house on East 81st Street, reports the outlet. The 57-year-old purchased the seventh-floor unit in dispute back in 2008.

Madonna has two teenaged children, Lourdes and Rocco, as well as two 10-year-olds, David Banda and Mercy James.

An attorney for Madonna did not get back to Page Six for a comment on the suit.

She may be Madonna, but that doesn't mean the co-op board cares!