
313 N.W.2d 463 (1981)
Marie HUGHES, Plaintiff and Appellant,
v.
Michael O'CONNOR, Defendant and Appellee.
No. 13377.
Supreme Court of South Dakota.
Considered on Briefs September 30, 1981.
Decided December 16, 1981.
*464 Douglas E. Kludt of Bergren & Duffy, Fort Pierre, for plaintiff and appellant.
Steven M. Johnson of Brady, Kabeiseman, Reade, Abbott & Johnson, Yankton, for defendant and appellee.
PER CURIAM.
Appellant brought this defamation action. Her appeal is from the order granting summary judgment in favor of appellee. We affirm.
Appellant's daughter is appellee's former wife. In the divorce action between the daughter and appellee, he sought and obtained custody of their daughter. At the divorce trial, appellee testified to his wife's drug use as follows:
Well, one specific incident [sic] I was out in Chamberlain, South Dakota, with her and her mother [appellant] and another nurse and we were at the hospital. And at that particular incident [sic], her mother and this other nurse went to the drug cabinet, took out some Darvon, some Dalmane, and some Penbritin and put [it] in a little first-aid kit, a blue band-aid box, and some Penicillin and some tetanus. And on the way out of the hospital Marie [appellant] opened the box... She said, "Look at all the money I am saving you, Mike. We have sleeping pills and pain pills and Penicillin, Penbritin, and some injectable Penicillin and also some tetanus". And I observed on many occasions of Patty [appellee's former wife] taking this Darvon or Darvocet, whatever the exact medical name is, I don't know. I saw her taking these on many occasions for headaches.
Appellant brought this action alleging in her complaint that appellee's testimony about the drug theft was defamatory. The trial court granted appellee's motion for summary judgment.
Appellant argues that the trial court erred in granting appellee's motion for summary judgment because the testimony was not privileged. Our view, however, is that appellee's testimony is privileged. "A privileged communication is one made.... [i]n any legislative or judicial proceeding, or in any other official proceeding authorized by law." SDCL 20-11-5(2). For a communication to be privileged within SDCL 20-11-5(2) four conditions must be met:
`[T]he publication (1) was made in a judicial proceeding; (2) had some connection or logical relation to the action; (3) was made to achieve the objects of the litigation; and (4) involved litigants or other participants authorized by law.'
Janklow v. Keller, 90 S.D. 322, 331, 241 N.W.2d 364, 368 (1976), quoting Bradley v. Hartford Accident & Indemnity Co., 30 Cal. App.3d 818, 106 Cal.Rptr. 718, 722 (1973). Appellant admits that appellee's testimony meets the first and fourth conditions since it involved litigants and was made in a judicial proceeding. The language setting out the four conditions is sufficiently broad to conclude that appellee's testimony also had a connection to the divorce action and that it was made to achieve the objects of *465 the action. Appellee's testimony that the drugs were stolen was to prove that his wife's drug use was without a prescription. The testimony concerned his wife's fitness as a mother and supported appellee's attempt to gain custody of his daughter, one of the objects of the divorce action. To hold that this testimony is not protected would defeat the purpose of the privilege which is to avoid the vexation of defending defamation actions where litigants seek to secure and defend their rights. See Janklow v. Keller, supra. Appellee's testimony was absolutely privileged within SDCL 20-11-5(2).
Appellee admitted that the alleged defamatory statement was made but raised the defense of absolute privilege. This defense avoids all liability for the communication. Hackworth v. Larson, 83 S.D. 674, 165 N.W.2d 705 (1969). Because no genuine issue of fact remained appellee was entitled to summary judgment as a matter of law. SDCL 15-6-56(c); see Hackworth v. Larson, supra; Brech v. Seacat, 84 S.D. 264, 170 N.W.2d 348 (1969). It was not error for the trial court to grant summary judgment for appellee.
The order is affirmed.
MORGAN, J., deeming himself disqualified did not participate.
