In an action for a divorce and ancillary relief, the defendant *569wife appeals from so much of an order of the Supreme Court, Richmond County (Felig, J.), dated February 1, 1989, as granted the plaintiffs motion to strike her counterclaim, and discontinued the plaintiff husband’s action.
Ordered that the order is reversed insofar as appealed from, on the law and as a matter of discretion, with costs, the action is reinstated, and the husband’s time to serve an answer to the wife’s counterclaim is extended until 20 days after service upon him of a copy of this decision and order with notice of entry.
The parties were married in 1972. In 1973, a child was born to the marriage. The husband, a former police officer, subsequently resigned from the police department and forfeited his pension as the result of selling an illegal handgun. He became the owner and operator of a medallion taxicab and earned approximately $60,000 per year. The parties’ marital home is jointly owned.
The husband commenced this action by service of a summons dated October 14, 1981. The summons was accompanied by a notice entitled "Action for a Divorce” which alleged cruel and inhuman treatment. The ancillary relief the husband requested included custody of the parties’ eight-year-old son, title to and exclusive possession of the marital home, and distribution of marital property. Shortly thereafter, the wife served a notice of appearance and demand for the complaint. The husband never served the complaint upon the wife.
In November 1981 the husband was indicted for murder.
In December 1981 the wife moved for pendente lite support. An order which incorporated a stipulation between the parties was entered by the court in January 1982. The order provided for pendente lite child support of $100 per week and maintenance of $50 per week, exclusive possession of the home by the wife with the proviso that she make first mortgage payments, retention of the taxicab and taxi medallion by the husband, payment of $805 per month by the husband to the wife to be used for the second mortgage on the home, and, if the husband should be convicted and incarcerated on the pending criminal charges, sale of the cab and medallion and application of the proceeds to satisfy liens, including the second mortgage, with the remainder to be divided equally between the parties.
In November 1982 the husband was convicted of murder in the second degree and sentenced to 15 years’ to life imprisonment. The record indicates that concurrent motions by the *570wife for support arrears and by the imprisoned husband to set aside the parties’ stipulation on the ground of coercion resulted in a determination dated April 5, 1984, which denied the husband’s motion, granted the wife support arrears, and suspended the husband’s support obligations under the earlier order until his release or until the wife affirmatively established that he had income or liquid assets.
The wife then interposed a verified counterclaim for divorce dated December 31, 1987, based on the husband’s imprisonment. The husband moved to strike the counterclaim on the ground that it was premature and not properly interposed, since no complaint was filed by him in the action. He also requested that the court deem the action abandoned as of the date of his conviction.
The Supreme Court, sua sponte citing CPLR 104 and 3217 (b), deemed the husband’s request to deem the action abandoned as an application for a discontinuance and ordered the husband’s action discontinued and dismissed it. The court also dismissed the wife’s counterclaim on the grounds that it was "technically premature”, as no complaint had been filed, and held that the counterclaim was extinguished by the discontinuance and dismissal of the husband’s action.
We find that the court abused its discretion by treating the husband’s request to deem his action abandoned as an application for a discontinuance, ordering the husband’s action discontinued, and dismissing the wife’s counterclaim.
Neither CPLR 104 nor CPLR 3217 (b) supports the grant of a discontinuance by the court if unfair prejudice results to the adversary (see, Siegel, Practice Commentaries, McKinney’s Cons Laws of NY, Book 7B, CPLR C3217:12). The court must consider whether substantial rights have accrued or his adversary’s rights would be prejudiced thereby as well as the stage that litigation has reached; the later the stage, the greater should be the court’s scrutiny of the plaintiff’s motives (see, Tucker v Tucker, 55 NY2d 378).
In the instant case, discontinuance of the action commenced by the husband in 1981 creates substantial prejudice to the wife by serving to vacate the court order of 1982 which provided the wife significant relief. Pendente lite maintenance and child support pursuant to that order, which were merely suspended during the husband’s imprisonment, have been extinguished, thereby requiring the wife to seek such relief de novo upon the husband’s release from jail. The wife is similarly deprived of the benefit of exclusive possession of the *571marital residence provided pursuant to the order, thereby entitling the husband to resume residence there upon his release.
Finally, in regard to eventual equitable distribution of the parties’ marital property, the discontinuance of the action commenced by the husband in 1981 might serve to deprive the wife of economic benefit. In that event, she would be required to commence a second action in 1990 or thereafter. Since marital property is defined as "all property acquired by either or both spouses during the marriage and before * * * the commencement of a matrimonial action” (Domestic Relations Law §236 [B] [1] [c]) any property which she might have acquired since 1981 would be included in the "marital pot” subject to equitable distribution. Moreover, the equitable distribution court would be precluded from selecting the earlier date as the valuation date for the marital residence or other marital property, a result with further potential negative consequences to the wife.
To grant a discontinuance in this case would be to lend the court’s aid to the husband’s bad faith. His sole apparent reason for seeking a discontinuance is to inconvenience the wife and cause her potential economic detriment. Under such circumstances discontinuance should not be granted (see, Schneider v Schneider, 32 AD2d 630).
We also find that the court erred in dismissing the wife’s counterclaim seeking a divorce on the ground of the husband’s confinement in prison for a period of three years (see, Domestic Relations Law § 170 [3]). A defendant may use as a counterclaim any claim she has against the plaintiff whether related or not to the plaintiffs claim (see, CPLR 3019 [d]). "A cause of action contained in a counterclaim * * * shall be treated, as far as practicable, as if it were contained in a complaint” (CPLR 3019 [d]). As was stated in Edelman v Edelman (88 Misc 2d 156, 159) "A counterclaim is in essence a complaint by a defendant against the plaintiff and alleges a present viable cause of action upon which the defendant seeks judgment. It is not a responsive pleading merely because it is contained in a responsive paper; to wit, the answer. It is not a defense. It need have no relationship to the basic cause of action of the plaintiff and indeed the counterclaim may assert any claim which the defendant has against the plaintiff regardless of origin or character. The pleader of a counterclaim is a plaintiff in his own right (Fettretch v McKay, 47 NY 426)” (see also, CPLR 3019 [d]; Matter of Westchester Express v State Ins. Fund, 151 AD2d 357; Brennan v Mead, 73 AD2d 926).
*572Even if the counterclaim was "technically premature” as the Supreme Court held, the liberal construction doctrine of CPLR 104 renders it impermissible to require that the wife suffer the expense and delay of filing substantially the same pleading, albeit under a different heading. Accordingly, the Supreme Court erred in dismissing the wife’s counterclaim. Kunzeman, Rosenblatt and Miller, JJ., concur.