
436 N.W.2d 17 (1989)
Carol A. KAARUP and Darrell R. Kaarup, Plaintiff and Appellant,
v.
ST. PAUL FIRE AND MARINE INSURANCE COMPANY, Home Federal Savings and Loan, a corporation, and Curt Hepner, individually, Defendants and Appellees.
No. 15948.
Supreme Court of South Dakota.
Considered on Briefs October 14, 1988.
Decided February 8, 1989.
*18 Michael J. McGill, Beresford, for appellant.
Edwin E. Evans of Davenport, Evans, Hurwitz & Smith, Sioux Falls, for appellee, St. Paul Fire and Marine Ins. Co.
G.J. Danforth, Jr. of Danforth, Danforth & Johnson, Sioux Falls, for appellee, Home Federal Sav. and Loan Ass'n.
Blaine O. Rudolph, Canton, for appellee, Curt Hepner.
AMUNDSON, Circuit Judge.
This appeal stems from an intermediate order that denied Carol and Darrell Kaarup's motion to compel discovery. We affirm in part, reverse in part and remand.
In 1979 Carol Kaarup purchased a home that she and her husband Darrell occupied at all material times. On July 24, 1980, First Federal Savings and Loan Association of Canton (First Federal) loaned Kaarups $50,000. Both Carol and Darrell signed the promissory note, and the note was secured by a mortgage on the home. Prior to making the loan, First Federal consulted with an attorney regarding the validity of taking a mortgage without Darrell's signature. The attorney advised First Federal that such a mortgage would be valid, and provided First Federal with a title opinion to that effect. First Federal relied upon the attorney's advice, issued the loan, and recorded the mortgage signed only by Carol Kaarup.
Kaarups defaulted on the note and, in April 1983, filed a Chapter 11 bankruptcy. In July 1983 First Federal brought a malpractice action against the attorney and his law firm who provided the title opinion. St. Paul Fire and Marine, (St. Paul) the attorney's liability carrier, settled with First Federal, and the note and mortgage were assigned to St. Paul.
In June 1984 First Federal and St. Paul filed a mortgage foreclosure action in Lincoln County. On January 9, 1986, Kaarups obtained summary judgment in that action. Following the trial court's decision, the complaint was amended to seek recovery on the promissory note only.
The trial court's decision in the mortgage foreclosure action was appealed to this court. On March 9, 1988, we affirmed the invalidity of the mortgage in St. Paul Fire and Marine Ins. v. Kaarup, 420 N.W.2d 364 (S.D.1988). During the pendency of that appeal, Darrell and Carol Kaarup filed a lawsuit in Minnehaha County alleging various causes of action against St. Paul and Home Federal, the successor in interest to First Federal, because of their attempts to enforce the mortgage.
In their suit against St. Paul and Home Federal, Kaarups requested the production of various documents, including:
5. All correspondence of St. Paul to and from its attorney and law firm, Robert E. Hayes and Davenport, Evans, Hurwitz & Smith relating to the incident alleged in or on the subject matter referred to in St. Paul's complaint, the assignment of the mortgage, the defense of the malpractice claim ..., the modification of the automatic stay, and the foreclosure of the invalid mortgage.
St. Paul responded:
St. Paul objects to production of any communication between itself and its attorney on the grounds of attorney/client privilege. SDCL 19-13-3.
Kaarups also requested production of copies of all legal bills that First Federal and St. Paul paid due to the motion to *19 modify the automatic stay of bankruptcy and to foreclose the mortgage. In addition, Kaarups requested all files relating to the incidents alleged in their complaint. When St. Paul refused to produce some information, Kaarups brought a motion to compel discovery of all relevant documents and files relating to the incidents, acts and occurrences alleged in their complaint. Kaarups specifically alleged that St. Paul failed to produce the insurance claim file arising from the malpractice lawsuit that First Federal filed against the attorney who provided the title opinion. The trial court denied Kaarups' motion. In a subsequent motion for reconsideration, the trial court again denied Kaarups' motion for discovery. This appeal followed.
After Kaarups requested production of documents in Kaarup v. St. Paul Fire and Marine, they served a request for production of documents in First Federal and St. Paul's lawsuit to recover on the promissory note in Lincoln County. This request for production of documents mirrored in many respects the request served by Kaarups in their lawsuit against St. Paul and First Federal. Kaarups sought production, among other things, of all legal bills from Davenport, Evans, Hurwitz & Smith to St. Paul since October 1, 1982, and all correspondence between First Federal and St. Paul relating to the legal malpractice action, the assignment of the note and mortgage to St. Paul, and all other acts and occurrences alleged to and referred in their complaint.
In response to Kaarups' request for production of documents in the Lincoln County action, St. Paul produced for inspection and copying: (1) the legal bills paid by St. Paul in connection with the malpractice and mortgage foreclosure actions; (2) all correspondence between St. Paul and First Federal; (3) St. Paul's claim file from the legal malpractice action; (4) all inter-office memorandums relating to the malpractice and foreclosure actions; and (5) all correspondence between Davenport, Evans, Hurwitz & Smith and St. Paul and First Federal regarding the validity of the mortgage.
St. Paul claims it has produced all of the information Kaarups requested except for the correspondence between attorney Robert Hayes and St. Paul. According to St. Paul, this correspondence is barred by the attorney/client privilege and the work product doctrine. Kaarups claim that St. Paul has failed to produce other information in its request for production of documents and that the information received in the Lincoln County action is not admissible in the Minnehaha County action.
For purposes of this appeal, the issues before this court are:
(1) Did the trial court properly deny Kaarup's motion to compel discovery?
(2) Is discovery of the correspondence between attorney Hayes and St. Paul barred by the attorney/client privilege or work product doctrine?

DID THE TRIAL COURT PROPERLY DENY KAARUPS' MOTION TO COMPEL DISCOVERY?
The scope of pretrial discovery is, for the most part, broadly construed. Bean v. Best, 76 S.D. 462, 80 N.W.2d 565 (1957). SDCL 15-6-26(b) provides, "Parties may obtain discovery regarding any matter, not privileged, which is relevant to the subject matter involved in the pending action...." A broad construction of the discovery rules is necessary to satisfy the three distinct purposes of discovery: (1) narrow the issues; (2) obtain evidence for use at trial; (3) secure information that may lead to admissible evidence at trial. 8 C. Wright and A. Miller, Federal Practice and Procedure, § 2001 (1970).
We previously concurred with the United States Supreme Court's construction of the discovery rules set forth in the seminal case of Hickman v. Taylor, 329 U.S. 495, 67 S.Ct. 385, 91 L.Ed. 451 (1947). State By and Through Dept. of Transp. v. Grudnik 90 S.D. 571, 243 N.W.2d 796 (1976). The Supreme Court stated in Hickman, supra:
... the deposition-discovery rules are to be accorded a broad and liberal treatment. No longer can the time-honored cry of "fishing expedition" serve to preclude a party from inquiring into the *20 facts underlying his opponent's case. Mutual knowledge of all the relevant facts gathered by both parties is essential to proper litigation. To that end, either party may compel the other to disgorge whatever facts he has in his possession. The deposition-discovery procedure simply advances the stage at which the disclosure can be compelled from the time of trial to the period preceding it, thus reducing the possibility of surprise. But discovery, like all matters of procedure, has ultimate and necessary boundaries.
329 U.S. at 507, 67 S.Ct. at 392, 91 L.Ed. at 460.
Our position on the scope of discovery has not changed. All relevant matters are discoverable unless privileged. In this regard, the trial court erred by denying Kaarups' discovery request on the basis that the materials sought by them could not legally become a part of the Kaarups' action against St. Paul and Home Federal.
The proper standard for ruling on a discovery motion is whether the information sought is "relevant to the subject matter involved in the pending action...." SDCL 15-6-26(b)(1). This phraseology implies a broad construction of "relevancy" at the discovery stage because one of the purposes of discovery is to examine information that may lead to admissible evidence at trial. 8 C. Wright and A. Miller, supra, § 2008.
Apparently some of the information Kaarups requested in their suit against St. Paul and Home Federal was produced by St. Paul in the Lincoln County action. We find it unnecessary for St. Paul to once again produce this same information in response to Kaarups' discovery request in Kaarup v. St. Paul Fire and Marine and Home Federal. To hold otherwise would result in the unnecessary duplication of discovery, especially when the same attorney has represented Kaarups in both actions. We also find that Kaarups have failed to show the information sought in the insurance claim file from the malpractice action is relevant to the subject matter of this action or will lead to the discovery of admissible evidence. We affirm the trial court's denial of discovery in this regard.

IS DISCOVERY OF CORRESPONDENCE BETWEEN ATTORNEY AND CLIENT BARRED BY THE ATTORNEY CLIENT PRIVILEGE OR WORK PRODUCT DOCTRINE?
Kaarups alleged various causes of action against St. Paul and Home Federal because of their attempts to foreclose on the mortgage. In response, St. Paul raised as one of its affirmative defenses that it acted in good faith and upon the advice of counsel. Kaarups attempted to determine the nature of counsel's advice by requesting copies of correspondence between the attorney and St. Paul and Home Federal. St. Paul refused to produce the correspondence, claiming it was protected by both the work product and attorney/client privileges.

ATTORNEY/CLIENT PRIVILEGE
SDCL 19-13-3 states the attorney/client privilege:
A client has a privilege to refuse to disclose and to prevent any other person from disclosing confidential communications made for the purpose of facilitating the rendition of professional legal services to the client
(1) between himself or his representative and his lawyer or his lawyer's representative[.]
To invoke the attorney/client privilege, four elements must exist: (1) a client; (2) a confidential communication; (3) the communication was made for the purpose of facilitating the rendition of professional legal services to the client; and (4) the communication was made in one of the five relationships enumerated in SDCL 19-13-3. State v. Catch the Bear, 352 N.W.2d 640 (S.D. 1984). Each of these elements is present in the relationship between St. Paul and its attorney.
The purpose of the attorney/client privilege is well established. Protecting communications between attorney and client supposedly encourages clients to make full disclosures to their attorneys, in turn enabling *21 the attorney to act more effectively, justly and expeditiously. 2 J. Weinstein and M. Berger, Weinstein's Evidence § 503[02] (1988). The assumption underlying this privilege is unverifiable, but was ingrained in the common law at an early date. It is now codified by statute in South Dakota.
Some well established exceptions to the attorney/client privilege exist. One of these is the advice of counsel exception. When a party asserts reliance upon the advice of counsel as an essential element of his defense, that party cannot refuse to disclose such advice. Haymes v. Smith, 73 F.R.D. 572 (W.D.N.Y.1976); Garfinkle v. Arcata National Corp., 64 F.R.D. 688 (S.D.N.Y.1974); Sedco International, S.A. v. Cory, 683 F.2d 1201 (8th Cir.1982); Bird v. Penn Central Co., 61 F.R.D. 43 (E.D.Pa. 1973). We do not believe, as some courts have held, that the defense of advice of counsel waives the attorney/client privilege with respect to all communication between client and counsel concerning the transaction for which counsel's advice was sought. Panter v. Marshall Field and Co., 80 F.R. D. 718 (N.D.Il.1978). We find that the attorney/client privilege is waived only to the extent necessary to reveal the advice given by an attorney that is placed in issue by the defense of advice of counsel. St. Paul, therefore, waived the attorney/client privilege as it relates to the advice given by St. Paul's attorney to foreclose on the mortgage, but the waiver does not extend to the advice given by St. Paul's attorney to seek collection on the promissory note in the case involving that action.

WORK PRODUCT DOCTRINE
An attorney's work product is defined by SDCL 15-6-26(b)(3) as "documents and tangible things ... prepared in anticipation of litigation or for trial by or for another party or by or for that other party's representative (including his attorney, consultant, surety, indemnitor, insurer or agent)...." The test we apply for determining whether a document or tangible thing is attorney work product is whether "in light of the nature of the document and the factual situation in the particular case, the document can fairly be said to have been prepared or obtained because of the prospect of litigation." 8 C. Wright and A. Miller, supra, § 2024 at 198. Attorney Hayes' advice regarding foreclosure of the mortgage is properly denominated work product because his advice was given in prospect of possible litigation to foreclose the mortgage.
A separate and related question is whether attorney Hayes' correspondence, containing his advice on foreclosure, is afforded protection under the work product doctrine in Kaarups' suit against St. Paul and Home Federal. Some courts have expressed the view that to extend protection to previously prepared documents in prior litigation, the issues in the present litigation must be closely related to those of the prior case. E.g. Midland Investment Co. v. Van Alstyne, Noel & Co., 59 F.R.D. 134 (S.D.N.Y.1973); Gagne v. Ralph Pill Electric Supply Co., 114 F.R.D. 22 (D.Me. 1987); 8 C. Wright and A. Miller, supra, § 2024 at 200-01. Other courts, however, have refused to allow the work product privilege to rest on the "technical touchstone" of relatedness. Duplan Corp. v. Moulinage et Retorderie de Chavnoz, 487 F.2d 480 (4th Cir.1973); In Re Murphy, 560 F.2d 326 (8th Cir.1977). In this case, Attorney Hayes' correspondence to and from St. Paul and Home Federal regarding the decision to foreclose on the mortgage is closely related to the present action. We defer deciding the related/unrelated distinction until another day when that issue is properly before us.
The protection afforded by the work product doctrine is broader than that created by the attorney/client privilege. United States v. Nobles, 422 U.S. 225, 95 S.Ct. 2160, 45 L.Ed.2d 141 (1975); Hickman v. Taylor, supra. As codified in SDCL 15-6-26(b)(3), the work product doctrine provides two levels of protection for an attorney's work product. An attorney's ordinary work product is discoverable "... only upon a showing that the party seeking discovery has substantial need of the materials in preparation of his case and that he *22 is unable without undue hardship to obtain the substantial equivalent of the materials by other means." SDCL 15-6-26(b)(3). An attorney's opinions and mental impressions receive a greater level of protection. SDCL 15-6-25(b)(3) further provides, "In ordering discovery of such materials when the required showing has been made, the court shall protect against disclosure of the mental impressions, conclusions, opinions, or legal theories of an attorney or other representative of a party concerning the litigation."
In giving effect to the phrase "the court shall protect against disclosure of the mental impressions, conclusions, opinions or legal theories of an attorney....", SDCL 15-6-26(b)(3), Federal Rule of Civil Procedure 26(b)(3) (emphasis added), courts have imposed a nearly absolute protection upon an attorney's opinion work product. Duplan Corp. v. Moulinage et Retorderie de Chavnoz, 509 F.2d 730 (4th Cir.1974); In Re Murphy, 560 F.2d 326 (8th Cir.1977). A recognized exception to the protection afforded opinion work product is the established rule that a party cannot affirmatively assert reliance upon an attorney's advice and then refuse to disclose such advice. Duplan Corp. supra, 509 F.2d at 735; 8 Wigmore, Evidence, § 2327 (McNaughten ed. 1961).
In Handgards, Inc. v. Johnson & Johnson, 413 F.Supp. 926 (N.D.Cal.1976), plaintiff brought an antitrust action alleging defendant had filed a series of patent infringement suits in bad faith. The court held that the principal issue in the case was the defendant's good faith in instituting and maintaining the actions and that the defendant's attorneys' internal files were relevant as to their advice on the merits of the prior patent infringement litigation. See also, Bird v. Penn Central Co., 61 F.R.D. 43 (E.D.Pa.1973); Am Inter., Inc. v. Eastman Kodak Co., 100 F.R.D. 255 (N.D. Ill.1981); Panter v. Marshall Field and Co., 80 F.R.D. 718 (N.D.Ill.1978); cf. Board of Trustees v. Coulter Corp., 118 F.R.D. 532 (S.D.Fla.1987).
In our view, St. Paul's reliance upon the defense of advice of counsel waives the nearly absolute protection afforded an attorney's opinion work product. St. Paul's waiver of the attorney opinion work product privilege applies only to the advice given by St. Paul's attorney to foreclose on the mortgage, and does not apply to the attorney's underlying legal theories, mental impressions, conclusions or opinions in arriving at the advice given to St. Paul and Home Federal. The waiver, furthermore, does not extend to any other attorney opinion work product. Even though St. Paul has waived the protection afforded work product as it relates to the advice given by St. Paul's attorney regarding the mortgage foreclosure, the substantial need test still applies. We find that the Kaarups have shown a substantial need to discover the advice of St. Paul's attorney and an inability to obtain the substantial equivalent of the materials by other means without undue hardship. We remand for an in camera review of the information not disclosed for the redacting from these documents of the mental impressions, conclusions, opinions, or legal theories of St. Paul's attorney by the trial court. This will allow the trial court to determine what information should be disclosed rather than the selective disclosure which has occurred in this case.

TIMELINESS
Finally, St. Paul contests the timeliness of Kaarup's appeal. Kaarups appealed from an intermediate trial court order. SDCL 15-26A-3. When we granted permission to appeal we obviously found that Kaarups presented their request for an intermediate appeal in a timely manner. Rather than contesting the timeliness of the appeal at this juncture, St. Paul should have filed a response to Kaarups' petition under SDCL 15-26A-16.
The order of the trial court denying the motion to compel is affirmed in part, reversed in part and remanded in accordance with this decision.
All the Justices concur.
AMUNDSON, Circuit Judge, for SABERS, J., disqualified.
