Appeal from a judgment of the Supreme Court at Special Term, entered August 28, 1975 in Albany County, which granted petitioner’s application, in a proceeding pursuant to CPLR article 78, ordering appellants to pay petitioner the balance of requisition CPFF 78, Rev. 2. Petitioner entered into a contract with the State on June 23, 1966 for the construction of the "Main Platform Foundation” at the South Mall in Albany, New York. Thereafter, the original contract was modified by an agreement of October 1, 1968 which terminated the unit price provisions and converted the balance of the contract work to a cost-plus-fixed-fee basis (CPFF). After the contract was again modified and after petitioner had substantially completed the construction, by mutual agreement the contract as modified was terminated as of April 13, 1971. On this appeal, appellants concede that thereafter the parties agreed that there was due petitioner on the main platform contract the sum of $1,234,356.90. In August, 1973 the Commissioner of the Office of General Services prepared a memorandum of understanding which set forth the substance of the verbal settlement agreement with requisition attached, but the Attorney-General declined to approve it. In December, 1974, petitioner submitted a proposed final payment certificate CPFF 78, Rev. 2 with release attached. This release recited that in consideration of $1,234,356.90, petitioner released the State to the extent of $826,640.75 to be paid forthwith, and reserved all rights for the balance of $407,716.15. On February 28, 1975 the State paid petitioner $826,640.75, less bond adjustments. On March 18, 1975, petitioner demanded the State pay the balance of $407,716.15. Upon the State’s refusal to pay, petitioner commenced this article 78 proceeding. Special Term found that allegations in the petition were not denied and that appellants’ answer raised only objections in point of law that had no merit and entered the judgment appealed from which directed appellants to pay petitioner the sum of $407,716.15, with interest thereon from March 1, 1973 to date of payment and to pay interest on the sum of $826,640.75 from March 1, 1973 to February 28, 1975, the date partial payment was made. On this appeal appellants claim that (1) Special Term had no jurisdiction in this proceeding pursuant to CPLR article 78 to grant a judgment which in effect directs the payment of money by the State of New York, (2) appellants were entitled to set off against moneys admitted to be due petitioner claims of the State of New York against petitioner arising from a separate and distinct contract between the State and petitioner, (3) it was error to allow interest on $826,640.75 from any date and (4) it was error to allow interest on $407,716.15 from March 1, 1973. We hold that Special Term had jurisdiction to entertain this proceeding to determine whether appellants failed to perform a duty enjoined upon them by law (CPLR 7803, subd 1). " 'An article 78 proceeding in the nature of mandamus is an appropriate remedy to compel performance of a statutory duty that is ministerial in nature but not one in respect to which an officer may exercise judgment or discretion’ (Matter of Posner v. Levitt, 37 A D 2d 331, 332) unless such judgment or discretion has been abused by arbitrary or illegal action (People ex rel. Lodes v. Department of Health of City ofN. Y., 189 N. Y. 187, 194). Mandamus will be granted only when a clear legal right thereto is demonstrated (Matter of Small v. Moss, 277 N. Y. 501, 507; 23 Carmody-Wait 2d, New York Practice, § 145:97, p 573), and the judgment in *747a mandamus proceeding may, in some circumstances, direct the payment of money (24 Carmody-Wait 2d, New York Practice, § 145:375, p. 225).” (Board of Educ. v Levitt, 42 AD2d 372, 374; see, also, Matter of Pfingst v Levitt, 44 AD2d 157, mot for lv to app den 34 NY2d 518.) In the instant proceeding the remaining act to be performed by appellants was ministerial in nature. The parties had agreed upon the amount due and payable to petitioner on the contract. Appellants were not justified in refusing to perform their ministerial duty under the circumstances established by the record. We do not question appellants’ statement that "under the proper circumstances the State is entitled to setoff against payments due on a contract not only claims against the contractor on the same contract, but also claims against the same contractor on other contracts” (e.g., Williams Press v State of New York, 45 AD2d 397, revd 37 NY2d 434). Appellants’ position in this regard is untenable because the record does not show the existence of any justiciable setoff or counterclaim in favor of the State against petitioner. Appellants attempt to justify their refusal to act because the State claims a "potential counterclaim exists” under a separate contract between the State and petitioner for the construction of part of the Cultural Center. The record also shows that petitioner’s performance of the contract on the Cultural Center project was guaranteed by a $10,000,000 surety bond. Of course the State is not directly a party to this action and we are not adjudicating the validity of the State’s "possible" counterclaim”. We hold that the record does not show the existence of a separate setoff or counterclaim at the time and withholding payment under the circumstances was arbitrary and illegal. As the State is vitally interested in this proceeding, it could have intervened under the liberal provisions of CPLR 7802 (8 Weinstein-Korn-Miller, NY Civ Prac, par 7802.04). After intervention the State could have counterclaimed in this proceeding and the court would then have been in a position to vindicate the State’s rights (CPLR 7804, subd [d]; 8 Weinstein-Korn-Miller, NY Civ'Prac, par 7804.06). It is axiomatic that "claims or demands sought to be set off must not only be mutual to the extent that they are owing by each to the other, but they must be due and payable, and, therefore, a claim not due cannot be set off against one which may be thereafter enforced. (De Camp v. Thomson, 159 N. Y. 444.)” (Michigan Sav. Bank v Millar, 110 App Div 670, 672, affd 186 NY 606.) The State has attempted to justify nonpayment by the assertion of a counterclaim or setoff not only not due and payable, but contingent, possible and in futuro. We agree that Special Term erred in directing payment of interest on the sum of $826,640.75 from March 1, 1973 to February 28, 1975. By virtue of the release executed by petitioner on December 10, 1974 the State was released from all liability to petitioner under the contract for the construction of the "Main Platform Foundation” at the South Mall and from all actions, causes of action and all sums arising therefrom, except the obligation to pay $1,234,356.90. Petitioner agreed to accept $826,640.75 at that time and reserved all rights to the balance of $407,716.15. The release effectively discharged the State from paying interest on the partial payment of $826,640.75. The only remaining obligation of the State was to pay the sum of $407,716.15. Immediate payment by the State of the balance of $407,716.15 without interest would have satisfied the remaining obligation of the State. On March 18, 1975, petitioner formally demanded of appellants the balance of $407,716.15. We hold that under the circumstances and by virtue of the operative effect of the release, interest should be paid to petitioner from March 18, 1975 the date of demand. The judgment should be modified by providing that interest is to be paid only on the sum of $407,716.15 from March 18, 1975. Judgment *748modified, on the law and the facts, by striking the last decretal paragraph thereof and by substituting therefor, "ordered and adjudged, that respondents be and they hereby are directed to pay petitioner the sum of $407,716.15 with interest from March 18, 1975”, and, as so modified, affirmed, without costs. Koreman, P. J., Main, Herlihy and Reynolds, JJ., concur; Greenblott, J., concurs in the following memorandum. Greenblott, J. (concurring). I concur in the result and agree on the whole with the reasoning set forth in the majority opinion. However, I do not wish to be considered as agreeing with appellants’ contention that the State is always entitled to a setoff against any claims against a contractor on other contracts. Until the Court of Appeals decides to the contrary, I adhere to the view that the right to setoff should be limited to those situations where there is an identity of factual issues, as enunciated in my concurring opinion in Williams Press v State of New York (45 AD2d 397, 403-404, revd on other grounds 37 NY2d 434).