
875 P.2d 89 (1994)
Everett L. ANDREWS and Hub City Construction Company, Inc., Appellants,
v.
WADE & DE YOUNG, INC., P.C., Appellee.
No. S-5542.
Supreme Court of Alaska.
June 10, 1994.
Thomas R. Wickwire, Fairbanks, for appellants.
Thomas L. Melaney, Anchorage, for appellee.
Before MOORE, C.J., RABINOWITZ, MATTHEWS and COMPTON, JJ., and BRYNER, J. Pro Tem.[*]

OPINION
RABINOWITZ, Justice.
Everett L. Andrews and Hub City Construction Co., Inc. (collectively referred to as "Hub City") appeal the superior court's dismissal, on res judicata grounds, of their legal malpractice claim against Wade & De Young, Inc.


*90 I. FACTS AND PROCEEDINGS


A. Wade & De Young's Action to Recover Its Legal Fees

Wade & De Young provided legal representation for Moneymaker/Hub City, J/V ("Joint Venture"), in the ASHA v. Moneymaker/Hub City, Joint Venture litigation. Following settlement of the ASHA litigation, Hub City declined to authorize any further payments to Wade & De Young for attorney's fees. Wade & De Young then brought suit seeking payment of its attorney's fees, in the amount of $690,000, earned in connection with the ASHA litigation. In its complaint Wade & De Young also asserted a possessory attorney lien (pursuant to AS 34.35.430), which it sought to foreclose, and additionally sought to interplead certain funds in its possession.
Hub City and the Joint Venture filed an answer to Wade & De Young's complaint. Thereafter the Joint Venture petitioned the Alaska Bar Association for arbitration of the fee dispute pursuant to Alaska Bar Rule 39(a).[1]
A panel of the Alaska Bar Association Fee Arbitration Committee (Fee Arbitration Panel) held a hearing and concluded that the amount of compensation due Wade & De Young for its legal services was $471,000 including all expenses, plus a pro rata share of accrued interest.
Wade & De Young then filed a motion requesting that the superior court confirm the Fee Arbitration Panel's award. After considering Hub City's opposition to the motion, the superior court confirmed the decision and award of the Fee Arbitration Panel on July 2, 1991.

B. Hub City's Legal Malpractice Action Against Wade & De Young

After the superior court's confirmation of the Fee Arbitration Panel's decision and award, Hub City filed a legal malpractice action against Wade & De Young, based upon the firm's representation of Hub City in the ASHA litigation. Wade & De Young subsequently filed a motion for dismissal, which the superior court granted "on res judicata grounds."[2] This appeal followed.

II. STANDARD OF REVIEW

Wade & De Young filed a motion to dismiss pursuant to Alaska Civil Rule 12(b)(6),[3] but presented materials outside the pleadings for the superior court's consideration.[4] When this occurs, the superior court must affirmatively state whether it considered such materials. Homeward Bound, Inc. v. Anchorage Sch. Dist., 791 P.2d 610, 611-12 (Alaska 1990); Brice v. State, Div. of Forest, Land & Water Mgmt., 669 P.2d 1311, 1314 (Alaska 1983); cf. Adkins v. Nabors Alaska Drilling, Inc., 609 P.2d 15, 21 n. 11 (Alaska 1980) (holding that whenever materials outside the pleadings are presented, the motion to dismiss is automatically converted to a motion for summary judgment unless the superior court expressly states that it is not considering the outside materials). If the superior court fails to state expressly what materials it considered, this court may "remand for proper consideration, review the decision as if the Rule 12(b)(6) motion was granted after exclusion of the outside materials, or review the decision as if the court granted a motion for summary judgment." *91 Homeward Bound, 791 P.2d at 612. In this case, the superior court's holding that res judicata applies clearly evidences its reliance upon materials outside the pleadings regarding the fee recovery action. Therefore, we will review the decision as if the superior court had entered summary judgment.[5]

III. DISCUSSION

Hub City asserts that the superior court erroneously dismissed its legal malpractice claim because (1) Wade & De Young failed to show that Hub City's legal malpractice claim existed at the time Hub City answered Wade & De Young's complaint for unpaid legal fees; and (2) the Fee Arbitration Panel lacked jurisdiction to decide any malpractice claims Hub City had against Wade & De Young and therefore collateral estoppel cannot be based upon the decision of the Fee Arbitration Panel.

A. The Superior Court Erroneously Granted Summary Judgment as to Wade & De Young's Claim that Hub City Failed to Comply with the Compulsory Counterclaim Provisions of Civil Rule 13(a)

Alaska Civil Rule 13(a) makes counterclaims compulsory in the following circumstances:
A pleading shall state as a counterclaim any claim which at the time of serving the pleading the pleader has against any opposing party, if it arises out of the transaction or occurrence that is the subject matter of the opposing party's claim... .
Failure to assert a compulsory counterclaim bars a party from bringing a later independent action on that claim. See Miller v. LHKM, 751 P.2d 1356, 1359 (Alaska 1988); Wells v. Noey, 399 P.2d 217, 220 (Alaska 1965). Since Hub City's legal malpractice action against Wade & De Young arises from the same litigation forming the basis for Wade & De Young's fee recovery action, Civil Rule 13(a) would preclude Hub City's legal malpractice action if the claim existed at the time Hub City served its answer in the fee recovery action.[6] A cause of action for attorney malpractice does not mature until "the client discovers or reasonably should have discovered the existence of all the elements of his cause of action." Wettanen v. Cowper, 749 P.2d 362, 364 (Alaska 1988).
In its briefing to this court, Wade & De Young argues that the facts establish that Hub City was aware of its malpractice claims prior to the superior court's July 1, 1991 confirmation of the Fee Arbitration Panel's award. This argument is grounded on the assertion that "every allegation made in the complaint which initiated the malpractice action was made at some phase of the fee dispute." Wade & De Young further notes that "corroboration of Hub City's knowledge of the existence of alleged malpractice claims rather early on in the fee dispute proceeding is found in the Offer of Judgment dated May 11, 1990."[7] The Offer of Judgment provided in part that Hub City would release Wade & De Young from all claims "including specifically those which arise or may arise out of [Wade & De Young's representation of Hub City in the ASHA litigation.]"
The flaw in Wade & De Young's position is that the superior court failed to state affirmatively that it was considering matters outside of the pleadings, thus converting Wade & De Young's Civil Rule 12(b)(6) motion to one for summary judgment. In Martin v. Mears, 602 P.2d 421, 426 (Alaska 1979), we held that "all trial courts must expressly state whether they have in fact excluded or considered such materials in reaching their decisions." As a consequence of the superior court's consideration of outside materials it was under "a mandatory duty" to treat Wade & De Young's motion as one for summary judgment and to dispose of it as provided in *92 Rule 56 after giving the parties a reasonable opportunity to present all material made pertinent to such a motion by Rule 56. Id.; accord Reed v. Municipality of Anchorage, 741 P.2d 1181, 1184 (Alaska 1987); Civil Rule 12(b).
Assuming that Wade & De Young made an appropriate showing in accordance with Civil Rule 56, the superior court's failure to give notice of its conversion of the Rule 12(b) motion denied Hub City a reasonable opportunity to present all material made pertinent to such a motion by Rule 56. The bulk of Wade & De Young's documentation upon which a grant of summary judgment could possibly rest is found in its reply memorandum to Hub City's opposition to Wade & De Young's motion to dismiss. Hub City had no opportunity to respond to the reply memorandum with affidavits or other admissible evidence showing the existence of genuine issues of material fact as to when it discovered or should have discovered its legal malpractice claims against Wade & De Young.
We therefore conclude that on this record Wade & De Young was not entitled to summary judgment dismissing Hub City's legal malpractice action based upon Hub City's failure to assert this claim as a compulsory counterclaim in the fee recovery action.

B. The Fee Arbitration Panel's Decision and Award Does Not Collaterally Estop Hub City from Instituting and Maintaining a Malpractice Action

Wade & De Young argues that Hub City's claims are also barred under the doctrine of collateral estoppel, based upon the Fee Arbitration Panel's decision.[8] Application of collateral estoppel requires three elements:
1) The plea of collateral estoppel must be asserted against a party or one in privity with a party to the first action;
2) The issue to be precluded from relitigation by operation of the doctrine must be identical to that decided in the first action;
3) The issue in the first action must have been resolved by a final judgment on the merits.
McKean v. Municipality of Anchorage, 783 P.2d 1169, 1171 (Alaska 1989) (quoting Murray v. Feight, 741 P.2d 1148, 1153 (Alaska 1987)).[9] There is identity of parties in the fee arbitration proceeding and in the legal malpractice action,[10] and a final decision and award on the merits was rendered in the fee arbitration proceeding.[11] Whether collateral estoppel applies thus turns on whether the issues in the fee arbitration proceeding and in the legal malpractice action are identical.
The fee arbitration proceeding involved the amount the Joint Venture and Hub City owed Wade & De Young for legal services rendered in the ASHA litigation. The legal malpractice litigation involves whether Wade & De Young committed malpractice during the course of its representation of Hub City in the ASHA litigation. In its fee arbitration decision and award, the Fee Arbitration Panel made no findings regarding Wade & De *93 Young's malpractice. Furthermore, Wade & De Young concede that the Fee Arbitration Panel lacks jurisdiction to adjudicate malpractice claims.[12] Resolution of a fee dispute is different from adjudication of a malpractice claim. While preclusion could arise based upon an arbitrator's decision, the Fee Arbitration Panel's decision and award does not bar Hub City's malpractice action, because the two proceedings implicate different legal and factual issues.

IV. CONCLUSION

We hold that Wade & De Young is not entitled to summary judgment. In the particular context of this record, we conclude that Wade & De Young failed to prove that no genuine issue of material fact exists as to whether Hub City had discovered or should have discovered its malpractice action at the time Hub City served its answer in Wade & De Young's suit to recover attorney's fees. As such, Wade & De Young has not shown that Hub City failed to comply with the compulsory counterclaim provisions of Civil Rule 13(a). Collateral estoppel does not arise from the Fee Arbitration Panel's decision and award because the fee arbitration proceeding and the legal malpractice action did not involve identical issues. We therefore REVERSE the superior court's dismissal of Hub City's malpractice action, and REMAND for further proceedings consistent with this opinion.
NOTES
[*]  Sitting by assignment made pursuant to article IV, section 16 of the Alaska Constitution.
[1]  In accordance with Alaska Bar Rule 39(a) Wade & De Young's complaint notified Hub City that it had the "right to file a Petition for Arbitration of Fee Dispute and stay this civil action."
[2]  The superior court cited Tolstrup v. Miller, 726 P.2d 1304 (Alaska 1986), in support of its decision. The superior court subsequently entered a Judgment of Dismissal, which dismissed Hub City's legal malpractice complaint with prejudice.
[3]  Civil Rule 12(b)(6) provides for dismissal of an action for failure to state a claim upon which relief may be granted.
[4]  Civil Rule 12(b) provides in part:

If, on a motion asserting the defense numbered (6) to dismiss for failure of the pleading to state a claim upon which relief can be granted, matters outside the pleading are presented to and not excluded by the court, the motion shall be treated as one for summary judgment and disposed of as provided in Rule 56, and all parties shall be given reasonable opportunity to present all material made pertinent to such a motion by Rule 56.
[5]  In reviewing summary judgment, this court determines whether there are any genuine issues of material fact, and whether the moving party is entitled to judgment as a matter of law. Drake v. Hosley, 713 P.2d 1203, 1205 (Alaska 1986).
[6]  Hub City also argues on appeal that there is no compulsory counterclaim requirement for interpleader actions. In LHKM, 751 P.2d at 1361-62, we rejected a similar contention.
[7]  Hub City filed its answer in the fee recovery action on May 3, 1990.
[8]  Both parties and the superior court refer to "res judicata." "Res judicata" includes the doctrines of merger, bar, direct estoppel, and collateral estoppel. Restatement (Second) of Judgments ch. 3 intr. note (1982); see also Jeffries v. Glacier State Tel. Co., 604 P.2d 4, 8 n. 11 (Alaska 1979). Merger and bar involve claim preclusion, and direct estoppel involves issue preclusion based upon an earlier determination of the same claim. Restatement (Second) of Judgments ch. 3 intr. note (1982). Merger, bar, and direct estoppel are not implicated in this case, so our discussion is limited to collateral estoppel.
[9]  When a subsequent action is based upon a different cause of action, collateral estoppel prevents the relitigation of issues determined in the first action. Jeffries, 604 P.2d at 8 n. 11.
[10]  In support of its argument that there is no identity of parties, Hub City suggests that the fee recovery action involved only the Joint Venture, not Hub City or Andrews in his individual capacity. This argument is without merit. Hub City was a named defendant in the fee recovery action and submitted an answer. Andrews brings the malpractice claim based upon his capacity as president and shareholder of Hub City. Based upon the record, we can discern no distinction between Hub City's interests and Andrews' interests. That Andrews was not a named party to the fee recovery action does not, therefore, preclude a holding of identity of parties.
[11]  After the panel's decision was confirmed by the superior court, Wade & De Young's fee recovery action was dismissed with prejudice.
[12]  Alaska Bar Rule 34(c) states in part:

All disputes concerning fees charged for professional services or costs incurred by an attorney are subject to arbitration under these rules except for:
....
(2) disputes where the client seeks affirmative relief against the attorney for damages based upon alleged malpractice or professional misconduct... .
