860 F.2d 135
62 A.F.T.R.2d 88-5878, 88-2 USTC  P 9571
In re FIRST FEDERAL SAVINGS AND LOAN ASSOCIATION OF DURHAM,Petitioner.FIRST FEDERAL SAVINGS AND LOAN ASSOCIATION OF DURHAM,Plaintiff-Appellant,v.James A. BAKER, III, Secretary of the Treasury, Departmentof the Treasury, Defendant-Appellee.
Nos. 87-3656, 88-3515.
United States Court of Appeals,Fourth Circuit.
Argued April 5, 1988.Decided Oct. 26, 1988.Rehearing Denied in No. 88-3515 Dec. 21, 1988.

John Martin Bray, Washington, D.C., for plaintiff-appellant.
Nancy Gerry Morgan, Washington, D.C., for defendant-appellee.
Before WIDENER and SPROUSE, Circuit Judges, and MICHAEL, United States District Judge for the Western District of Virginia, sitting by designation.
SPROUSE, Circuit Judge:


1
First Federal Savings and Loan Association of Durham (the taxpayer) brought this mandamus action against James A. Baker, III, the Secretary of the Treasury of the United States, to compel him to pay a tax refund which the taxpayer contends was required by a settlement agreement between it and the Department of Justice representing the Internal Revenue Service (IRS).  The district court denied the Secretary's motion to dismiss for lack of jurisdiction but, agreeing with him that it had no jurisdiction, ordered the action transferred to the United States Claims Court, and the taxpayer appeals (Case No. 88-3515).  The taxpayer also filed a petition for writ of mandamus with the court asking us to direct the district court to assume jurisdiction.  We consolidated the appeal and petition for writ of mandamus for our consideration on appeal.


2
In February 1985, the taxpayer and the IRS finalized a compromise and settlement of the taxpayer's previous tax refund action by filing a stipulation for a dismissal in the district court.  That refund suit had consisted of claims for refunds for the years 1967 through 1974, resulting from net operating losses incurred in the years 1975 and 1976, which under applicable law could be carried back to the years 1967 through 1974.  The taxpayer also claimed a carry-over of the 1975 and 1976 losses to the years 1977, 1978, and 1979, resulting in a decrease in tax for those three latter years.  In the original refund action, one of the IRS' primary concerns was the loss carry-over to the years 1977 through 1979.  Its intentions were to contest that portion of the carry-over, but it felt that it might be barred by the applicable statute of limitations.  As a result of the settlement, the taxpayer agreed to relinquish the carry-overs for the years 1977 through 1979 and their concomitant advantages.  In return, the IRS allowed the taxpayer to claim refunds for the years 1971, 1973, and 1974 (the claims involved in this mandamus action).  The negotiations and the resulting agreement were complex, but the tax technicalities upon which the agreements were based luckily have no bearing on the outcome of this appeal.  Through a device that the parties concede to be artificial, the agreement placed two tax years into the agreement that were not involved in the refund action they were settling, namely, the tax years 1980 and 1981.  It was agreed that the parties would assume that the net operating losses in the years 1980 and 1981 were utilized as carry-backs against the taxable income for the years 1977 through 1979 as if the taxpayer had not claimed on its returns for those years net operating loss carry-overs from 1975 and 1976.  The net effect was that the taxpayer conceded that the United States was entitled to interest in the amount of $108,785 for the years 1977 through 1979.


3
In order to comply with the appropriate section of the Internal Revenue Code, the losses for 1980 and 1981 were required first to be carried back against the taxable income for the years 1971, 1973, and 1974 before carrying the excess to the years 1977 through 1979.  As part of the settlement agreement, the IRS prepared and submitted to the taxpayer an "Explanation of Items" which the taxpayer accepted.  That document provides:


4
Pursuant to the settlement agreement, the taxpayer is entitled to a bad debt deduction in the amount of $337,000 and $560,848 for 1975 and 1976 respectively.  Under the settlement, taxpayer would have taxable income for 1971, 1973, and 1974.  The losses for 1980 and 1981 first would be carried back to eliminate that taxable income;  however, to expedite the processing of the refunds, taxpayer has agreed to file claims for refund for 1971, 1973, and 1974.  For purposes of computing interest for 1967 through 1973, interest is computed on the overpayments of tax commencing January 31, 1980.  The interest on the deficiency, prior to NOL carrybacks, for 1977 runs from the due date of the return to the last day of the loss year (1981).  Interest for 1978 and 1979 runs from the due dates of the returns to March 15, 1983, the filing date for 1982.  The statute of limitations for assessing deficiencies for 1977, 1978, and 1979 has expired;  however, the taxpayer agreed that the refund of tax, interest paid and statutory interest otherwise due under the settlement is reduced by the amount of interest due for 1977, 1978, and 1979, computed under Section 6601(d).  The taxpayer has also agreed that it will not claim a deduction in any year subsequent to 1976 for the chargeoff of any of the loans, the charge offs of which in 1975 and 1976 are being conceded not to be deductible.


5
Part of the settlement agreement, as stated in the stipulation for dismissal filed with the district court, provided:


6
Plaintiff reserves the right to claim and receive such refunds as may be legally due to it by reason of the carry back of allowable net operating losses from 1980 and subsequent tax years to 1971, 1972, 1973 and 1974, and the stipulation of dismissal to be filed in this action shall be without prejudice to plaintiff's right to claim any refunds for the years to which it may be legally entitled because of such carrybacks.


7
The settlement agreement provides the technical scenario in which the controversy we now consider developed.  Well-represented, sophisticated parties reached the settlement, and it was not the complexity that brought the taxpayer and the IRS again into disagreement.  It was rather the simple oversight by both parties of a statute of limitations governing the filing of the claim for refund.  The taxpayer, pursuant to the settlement agreement, filed his claim for refund on March 20, 1985 (four weeks after the settlement was finalized by the entry of the stipulation and dismissal of the refund action).  The IRS then discovered that the statute of limitations for refund claims generated by the carry-back of the 1980 losses had expired on March 15, 1984, and that the statute governing the carry-back of the 1981 losses had expired on March 15, 1985.  The IRS denied the taxpayer's claim for refund on the ground that it was barred by the statute of limitations, and the taxpayer brought this mandamus action pursuant to 28 U.S.C. Sec. 1361.


8
The district court, in transferring the taxpayer's action to the United States Claims Court, found that it involved only contract issues concerning whether the IRS waived the taxpayer's compliance with the statute of limitations in reaching the settlement and whether in the absence of such a waiver a mutual mistake as to the existence of the taxpayer's refund claim rights should provide a ground for rescission.  It opined that, because the Tucker Act* provided an adequate forum in which the taxpayer's contract dispute could be resolved, a federal district court had no jurisdiction to entertain this mandamus action.  The district court erred in transferring the action.

28 U.S.C. Sec. 1361 provides:

9
The district courts shall have original jurisdiction of any action in the nature of mandamus to compel an officer or employee of the United States or any agency thereof to perform a duty owed to the plaintiff.


10
The propriety of entertaining a petition for writ of mandamus in the federal system is, of course, well defined.  It may be invoked only where three elements co-exist:  (1) the petitioner has shown a clear right to the relief sought;  (2) the respondent has a clear duty to do the particular act requested by the petitioner;  and (3) no other adequate remedy is available.  Green v. Heckler, 742 F.2d 237, 241 (5th Cir.1984);  Jones v. Alexander, 609 F.2d 778, 781 (5th Cir.), cert. denied, 449 U.S. 832, 101 S.Ct. 100, 66 L.Ed.2d 37 (1980).  In other words, the petitioner must demonstrate that his right to the issuance of the writ is "clear and indisputable."    Allied Chemical Corp. v. Daiflon, Inc., 449 U.S. 33, 35, 101 S.Ct. 188, 190, 66 L.Ed.2d 193 (1980);  Kerr v. United States District Court, 426 U.S. 394, 403, 96 S.Ct. 2119, 2124, 48 L.Ed.2d 725 (1976);  In re Ralston Purina Co., 726 F.2d 1002, 1004 (4th Cir.1984).  Mandamus against a public official will not lie unless the alleged duty to act involves a mandatory or ministerial obligation which is so plainly prescribed as to be free of doubt.  See Nova Stylings, Inc. v. Ladd, 695 F.2d 1179, 1180 (9th Cir.1983);  Save the Dunes Council v. Alexander, 584 F.2d 158, 162 (7th Cir.1978);  Short v. Murphy, 512 F.2d 374, 377 (6th Cir.1975).  Mandamus is not favored except in extraordinary situations.  Allied Chemical Corp. v. Daiflon, Inc., 449 U.S. at 34, 101 S.Ct. at 189;  Will v. United States, 389 U.S. 90, 95, 88 S.Ct. 269, 273, 19 L.Ed.2d 305 (1967);  Bankers Life & Casualty Co. v. Holland, 346 U.S. 379, 384-85, 74 S.Ct. 145, 148-49, 98 L.Ed. 106 (1953);  Ex Parte Fahey, 332 U.S. 258, 259, 67 S.Ct. 1558, 1559, 91 L.Ed. 2041 (1947).  In our view, the taxpayer's treatment by the IRS represents the type of extraordinary circumstances on which mandamus relief can be properly based.


11
The dismissal of the earlier suit was based on a stipulation between the parties which informed the district court of the agreement settling that suit and detailing its terms.  We think that the terms of the settlement are clear and that the respective rights and obligations it fixes are well-defined.  One of the terms gave the taxpayer the right to obtain refunds for the years 1971, 1973, and 1974 in amounts calculated by the IRS to be obtained by the taxpayer filing a claim for refunds for those years.  The parties and the district court in this action agreed that neither the taxpayer nor the IRS was aware that the statute of limitations covering some of the refunds had already expired, even before their negotiations were completed, and that the remaining refund would soon be barred (as it turned out, before the taxpayer could reasonably be expected to make its refund claim).  The IRS in its "Explanation of Items" refers to the statute of limitations that would have affected its collection efforts on its 1977 through 1979 claims but for the settlement.  In view of its silence regarding a statute of limitations potentially adverse to the taxpayer, the conclusion that there was a mutual oversight is even more compelling.  Because there is no suggestion of malicious intent, innocent mistake is apparent, but in this instance the taxpayer was no less ambushed than had it been deliberately misled.


12
The taxpayer had been involved with the IRS in protracted litigation involving its previous claim for a sizable refund.  The IRS, in its role as tax collector, conceived a considerable advantage in having the taxpayer relinquish the possibility that it could carry forward tax losses into the years 1977, 1978, and 1979.  It agreed with the taxpayer that, if the latter gave up that claim, the taxpayer could by a somewhat artificial and arbitrary device claim operating losses carried back to earlier years.  The IRS later presented this settlement agreement in the form of a stipulation to the district court as a basis for its dismissal of the underlying action.  Obviously the district court dismissed the taxpayer's refund action on the basis that it had been settled on the stipulated conditions.


13
It is true that the taxpayer's right was defined in the settlement agreement as a right "to claim and receive such refunds as may be legally due to it by reason of the carry back of allowable net operating losses from 1980 and subsequent tax years to 1971, 1972, 1973 and 1974."    We are persuaded, however, that the parties intended the taxpayer's right to the refund to be absolute and that the IRS' argument that the taxpayer's right was contingent is based on a reading of language out of the context of the complete agreement.  The parties clearly contemplated that the agreement of the taxpayer to file claims instead of receiving the refunds outright was an accommodation to the IRS "to expedite the processing of the refunds."    Moreover, the amount of the funds had been calculated by the IRS prior to the filing of the stipulation for a dismissal in the district court.  In our view, the settlement contemplated that, after the taxpayer applied for the refunds, payment was to be automatic--a purely mechanical action through normal payment channels.


14
In Vishnevsky v. United States, 581 F.2d 1249 (7th Cir.1978), the Seventh Circuit Court of Appeals, when faced with similar issues and noting the IRS's argument that the taxpayers in that case had an adequate remedy that should bar consideration of writ of mandamus, remarked:


15
We note also that this adequate remedy argument comes with particularly poor grace in the circumstances of this case.  "Even tax administration does not as a matter of principle preclude considerations of fairness."    Angelus Milling Co. v. Commissioner of Internal Revenue, [325 U.S. 293, 297, 65 S.Ct. 1162, 1165, 89 L.Ed. 1619 (1945) ].  A suit for mandamus may be governed by equitable considerations, ... and the equities here are all on the side of the taxpayers.  The complexities of this case could quickly be swept aside if we were only concerned with fundamental fairness.


16
Id. at 1255.


17
The taxpayers in Vishnevsky had filed a claim for a tax refund after the expiration of the applicable statute of limitations.  The IRS previously had notified them that the refund, due to an overassessment, would be credited to underpayment for other years "[w]hen final determination is made as to the deficiency proposed in this letter."    When the IRS denied the taxpayers' claim for a refund because the statute of limitations barred it, they filed a petition for writ of mandamus in a district court seeking to require the IRS to pay the refund.  The Seventh Circuit, in reversing the district court, held not only that the taxpayers had no other adequate remedy but that there was a clear duty on the part of the IRS to pay the refund because the IRS had, in effect, led the taxpayers into the perhaps negligent belief that the refund would be paid without any further action by them.  The Seventh Circuit there noted that the circumstances of the case were unique, a characterization that we also apply to the case we now consider.


18
At the most, the taxpayer here and the IRS shared a mutual mistake as to the absence of any statute of limitations that might have affected their settlement.  The taxpayer gave up a valuable litigation position in exchange for a tax consideration so definite that the IRS had computed the amount of refund due before the parties had filed the stipulation for dismissal in the district court.  We understand the reluctance of the district court to entertain the petition for mandamus in an area where reticence is precedentially required.  We are impressed, however, as were our brothers in the Seventh Circuit in Vishnevsky, that we should not overlook basic equitable principles when they are enmeshed in mandamus considerations.  Mandamus, of course, is not an equity action, and general principles of fairness unfortunately do not always carry the day in litigation traditionally circumscribed by formalistic rules.  Equity nevertheless often illuminates the issues in the mandamus proceeding.  Here equity considerations are completely one-sided;  both the IRS and the taxpayer were secure with their settlement agreement.  The IRS was so secure that it presented the settlement agreement to the district court as a basis for dismissing the taxpayer's viable claim for a refund.  Under the discrete circumstances of this case, we think that, not only is no other adequate remedy available to the taxpayer, but also the taxpayer has a clear right to the refund and that the Secretary of the Treasury has a clear and nondiscretionary duty to pay it.


19
It is, of course, not necessary for a plaintiff in a section 1361 mandamus action to prove the merits of his case in order to establish jurisdiction.  If the complaint states nonfrivolous allegations of the existence of the essential elements supporting a mandamus action, jurisdiction is established and a trial court must determine a remedy vel non on the merits.  See Carpet, Linoleum & Resilient Tile Layers v. Brown, 656 F.2d 564, 567 (10th Cir.1981);  Jones v. Alexander, 609 F.2d at 781;  Archbishop Bergan Mercy Hospital v. Heckler, 614 F.Supp. 1271, 1275 (D.Neb.1985);  Brown v. Weinberger, 382 F.Supp. 1092, 1096 (D.Md.1974), aff'd, 529 F.2d 514 (4th Cir.1975).


20
The parties here, however, have gone considerably beyond the complaint.  In motions, arguments, and briefs before the district court, as well as in their presentation to this court, they appear to agree on all the facts on which a merits decision should be based.  As we interpret the record, the IRS has computed the amount of losses to be carried back to each of the affected years.  It has also acknowledged the amount of taxes due and paid in those years so that the amount of refund due under the settlement agreement can be determined by simple mathematical computations.  On remand, the district court should, of course, vacate its order which transferred this action to the United States Claims Court and assume jurisdiction.  Additionally, if the facts relating to the refund amount have been ascertained, it should order the Secretary to pay the taxpayer that amount.  If calculations which are solely mechanical are necessary, the court should order that to be done.


21
In view of the above, the decision of the district court in Case No. 88-3515 is reversed and remanded for further proceedings consistent with this opinion.  In view of our holding in Case No. 88-3515, the issues raised by the taxpayer's petition to this court for a writ of mandamus (Case No. 87-3656) are moot, and that petition is dismissed.


22
REVERSED AND REMANDED WITH INSTRUCTIONS.



*
 28 U.S.C. Sec. 1491


