The legal dogfight that pitted the Nassau district attorney against a co-op board that was determined to evict her and her pooch is over.

Kathleen Rice will be able to keep Pearl, her beloved Morkie -- a Maltese and Yorkshire terrier mix -- and not be forced out of her Garden City apartment, said a statement from attorneys for Rice and the co-op board.

"Kathleen and the co-op board have resolved their disagreement amicably and, as a result, Kathleen's adopted dog Pearl will remain living in her home," read a joint statement from Steve Cohn, Rice's attorney, and Marc Schneider, the co-op board's attorney.

"Kathleen and the board are pleased with the agreement and the fairness that has been achieved for both parties. We will have no further comment on this matter."

The settlement brings to an end a matter that had concerned Rice for months because the board found her in violation of House Rule No. 20. That rule stipulated as of May 2010 that new pets were not allowed into the complex without prior approval. Rice has owned the apartment since 2007.

She said in an affidavit that she learned of the rules change from a neighbor while walking Pearl a week after adopting her in April and that she was never informed about the policy by the board or its members.

The co-op board found out about Pearl and served Rice with an eviction notice on Oct. 27, giving her 30 days to come into compliance, according to court papers.

She got a restraining order and the matter played out in state Supreme Court court, but the parties reached a settlement allowing her to keep Pearl and amending the pet ownership policy to allow co-op owners to register new and current pets.