
607 P.2d 561 (1980)
James PHILLIPS, Plaintiff and Respondent,
v.
Garnett LOBERG, Defendant and Appellant.
No. 14890.
Supreme Court of Montana.
Submitted November 14, 1979.
Decided March 10, 1980.
*562 Datsopoulos & MacDonald, Missoula, for defendant and appellant.
Christian, McCurdy, Ingraham & Wold, Polson, for plaintiff and respondent.
HASWELL, Chief Justice.
Defendant Garnett Loberg appeals from an order granting summary judgment in favor of the plaintiff. Loberg contends that res judicata or collateral estoppel should not be applied to bar certain of his defenses. We agree.
Georgia McIntyre, third party defendant, borrowed $9,000 from the plaintiff, James Phillips, on March 29, 1976, executing a promissory note with a maturity date of July 1, 1976. As security for the loan, McIntyre delivered the title of a 1968 Mack logging truck to Phillips and advised him that she would repay the loan when she sold the truck and an accompanying Peerless logging trailer. Shortly thereafter, Loberg agreed to purchase the truck from McIntyre for $5,700. No payment dates were specified, instead payments were to be made as Loberg derived income from the use of the truck.
On September 29, 1976, Phillips filed suit, District Court Cause No. 9636, against McIntyre on the $9,000 promissory note. The same day a writ of attachment was issued by the District Court which was served upon Loberg on October 1, 1976. On October 18, 1976, Loberg paid $4,000 of the $5,700 purchase price to McIntyre.
A default judgment was taken against McIntyre on December 15, 1976. The District Court issued a writ of execution on April 13, 1977, which was served upon Loberg on April 26, 1977.
In addition to the $4,000 payment on October 18, 1976, Loberg made the following payments to McIntyre: $200 on April 19, 1977; $1,000 on June 3, 1977; and $500 on July 23, 1977. Upon the last payment in July, 1977, the total agreed purchase price of $5,700 had been paid.
Thereafter on August 10, 1977, Phillips filed a petition under District Court Cause No. 9636 seeking to hold Loberg in contempt. The petition alleged that the payments made to McIntyre violated the court's writs of attachment and execution. A citation and order to show cause was issued, and it was served upon Loberg on August 15, 1977.
Loberg appeared without counsel on August 24, 1977, in a show cause hearing and he appeared with counsel in an additional show cause hearing on August 31, 1977. An order finding Loberg in contempt was issued on September 28, 1977. The order sentenced Loberg to county jail for five days and fined him $500. However, the execution of the order was suspended with Loberg given thirty days to purge himself *563 of contempt by paying the $5,700 owing on the writs of attachment and execution.
Neither McIntyre nor Loberg made payments in satisfaction of the default judgment taken against McIntyre or the contempt order issued against Loberg. As a consequence, Phillips filed a complaint against Loberg in District Court Cause No. 10300 to recover the $5,700 plus costs. Loberg answered and impleaded Georgia McIntyre. The answer contained six enumerated defenses which attacked the content and validity of the writs, the existence of a debt, and the validity of the contempt order. The answer also contained a third party complaint against Georgia McIntyre. Phillips' motion to strike the enumerated defenses and third party complaint was granted. The court stated in its order granting Phillips' motion that the issues raised by Loberg in the enumerated defenses "have been fully heard and adjudicated upon their merits in the civil contempt hearing held in Cause No. 9636 and that the doctrines of collateral attack, collateral estoppel and res judicata each preclude relitigation of the issues."
On May 9, 1979, the District Court granted Phillips' motion for summary judgment. The court once again found that all issues raised by Loberg had either been fully heard and adjudicated or Loberg had the opportunity to raise the defenses and issues and failed to do so in the prior contempt hearing in Cause No. 9636. As a result of the doctrines of collateral attack, collateral estoppel, or res judicata, the District Court found that no genuine issue of material fact was presented and that the plaintiff was entitled to judgment as a matter of law.
The issue on appeal is whether the District Court was correct in granting plaintiff summary judgment. To determine this issue, the question becomes whether the principles of collateral attack, collateral estoppel and res judicata were properly applied in striking Loberg's defenses.
At the outset we must look to the content of the defenses to see which doctrine applies. Defendant Loberg asserts in his second enumerated defense that "the writ of attachment was void ab initio for failure to comply with statutory requirements." In the fourth enumerated defense, Loberg states "said conclusion by the court [the finding of contempt] was erroneous for the reason that the court was not fully informed of the circumstances and was not apprised of the due process deficiencies of service or the invalidity of the writ of attachment." The sixth enumerated defense stated that "[t]he writ of attachment and the writ of execution were void as to Defendant because they were not duly recorded, as required by law, in Sanders County." In summarizing these defenses, it is quite obvious that Loberg is contending that the writs were never valid and that, as a consequence, there was no basis for finding him in contempt of a valid court order.
The following discussion in Western Montana Production Credit Association v. Hydroponics, Inc. (1966), 147 Mont. 157, 161, 410 P.2d 937, 939, distinguishes the doctrines of res judicata and collateral estoppel and illustrates the effect of each doctrine.
"`The term res judicata is often used to denote two things in respect to the effect of a valid, final judgment: (1) that such judgment, when rendered on the merits, is an absolute bar to a subsequent action, between the same parties or those in privity with them, upon the same claim or demand; and (2) that such a judgment constitutes an estoppel, between the same parties or those in privity with them, as to matters that were necessarily litigated and determined although the claim or demand in the subsequent action is different. Under the first proposition the judgment operates as a bar ... Under the second proposition the judgment prevents the parties from relitigating only those matters that were determined.' 1-B Moore F.P. 621-622, § 0.405. "The first proposition is properly called res judicata while the second is called collateral estoppel." (Emphasis added.)
On the other hand, collateral attack is the doctrine applied in "every proceeding in which the integrity of a judgment is challenged, except those made in the action *564 wherein the judgment is rendered or by appeal, and except suits brought to obtain decrees declaring judgments to be void ab initio." Daly Bank v. State (1957), 132 Mont. 387, 395, 318 P.2d 230, 236; State ex rel. Delmoe v. Dist. Court (1935), 100 Mont. 131, 136, 46 P.2d 39, 42; Burke v. Inter-State Savings & Loan Assn. (1901), 25 Mont. 315, 321, 64 P. 879, 881.
Thus, the doctrines of collateral estoppel and res judicata apply to the effect of a valid final judgment and collateral attack is the doctrine applied when the validity of a judgment is challenged. In our present appeal Loberg is attacking the validity of the contempt order; therefore, collateral attack is the appropriate doctrine.
In a case involving a contempt citation and a collateral attack upon the underlying court order, this Court stated:
"There is no doubt that a party cannot be guilty of contempt of court for disobeying an order which the court had no authority to make. (Cites omitted.) But it is well settled that judgments of courts which are of general jurisdiction and whose prima facie authority therefore extends to questions of the kind purported to have been adjudicated, are entitled to every presumption of validity, and that they are not open to collateral attack unless shown void upon inspection of the judgment roll, and that in the absence of the judgment roll the court cannot try the question." (Cites omitted.) State ex rel. Enochs v. Dist. Court (1942), 113 Mont. 227, 233, 123 P.2d 971, 974.
As a result we must look to the record as well as the statutory requirements for valid writs of attachment and execution.
Turning first to the statutes providing the requirements for attachment and execution, the "Manner of Attaching Property" is provided in section 27-18-401, MCA et seq. Section 27-18-405, MCA, provides, in pertinent part:
"(1) Debts or credits and personal property not capable of manual delivery and personal property in the possession of a third person must be attached by leaving with the person owing such debt or having in his possession or under his control such credits and personal property or with his agent a copy of the writ and a notice that the debts owing by him to the defendant or the credits and other personal property in his possession or under his control, belonging to the defendant, are attached in pursuance of such writ.

"(2) Upon receiving information in writing from the plaintiff or his attorney that any person has in his possession or under his control any credits or other personal property belonging to the defendant or is owing any debt to the defendant, the sheriff must serve upon such person a copy of the writ and a notice that such credits or other property or debts, as the case may be, are attached in pursuance of said writ." (Emphasis added.)
Section 27-18-307, MCA, provides that a lien shall accrue only upon attachment.
"All liens by attachment shall accrue at the time the property of the defendant shall be attached by the officer charged with the execution of the writ, in the order in which the writs are levied, and said lien shall not be affected by any subsequent attachment or by any judgment obtained subsequent thereto."
Further, section 25-13-501, MCA, provides that the same procedures are required to attach a debt when a writ of execution is involved. This section provides:
"... Shares and interest in any corporation or company, debts and credits, and all other property, both real and personal, or any interest in either real or personal property, and all other property not capable of manual delivery may be attached on execution, in like manner as upon writs of attachment. ..." (Emphasis added.)
The preceding statutes establish that service of a writ of attachment or execution is not alone sufficient to create a lien when a debt owed by a third person is the subject of the attachment; also required is service of a notice that the debt owing is attached in pursuance of the writ. If the writ and notice are not served, the *565 debt is not properly attached and no lien is created. It necessarily follows that if the property is not properly attached, the writ of attachment is a nullity.
As previously stated, a party cannot be held in contempt for violating an invalid court order, and in order for a collateral attack of a contempt citation to be allowed it must appear from the record that the underlying order (the writs of attachment and execution in this appeal) is void. State ex rel. Enochs v. Dist. Court, supra.
The record in our present appeal discloses that only the writ of attachment and the writ of execution were served upon Garnett Loberg. He never received a notice that the debt owing to Georgia McIntyre was attached in pursuance of the writ. As a result of section 27-18-405, MCA, section 27-18-307, MCA, and section 25-13-501, MCA, there was never a proper attachment and no lien was ever created. Since there was never a proper attachment the writs themselves were a nullity and could not provide a basis for a contempt citation.
Once it is shown that a collateral attack is proper and the underlying judgment is void, it will not have any preclusive effect and the case must be tried on the merits. Here it was error for the District Court to conclude its order granting plaintiff's motion to strike enumerated defenses by stating that "the doctrines of collateral attack, collateral estoppel and res judicata each preclude relitigation of the issues."
The District Court, in granting summary judgment concluded as follows:
"2. That a cause of action exists against Defendant GARNETT LOBERG by Plaintiff JAMES PHILLIPS and that the cause of action is supported by statutory law, to-wit, Section 93-4313 (sic) R.C.M. 1947, MCA Section 27-18-407 1979;
"3. That as a matter of law no genuine issue as to any material fact remains to be tried and that Plaintiff is entitled to judgment as a matter of law."
The statutory basis for the District Court's judgment, section 27-18-407, MCA, provides:
"All persons having in their possession or under their control any credits or other personal property belonging to the defendant or owing any debts to the defendant at the time of service upon them of a copy of the writ and notice shall be, unless such property be delivered up or transferred or such debts be paid to the sheriff, liable to the plaintiff for the amount of such credits, property, or debts until the attachment be discharged or any judgment recovered by him be satisfied." (Emphasis added.)
As previously stated, there was never a valid attachment since a notice of attachment was never served upon the defendant. Hence, the foregoing statute does not provide a basis for the defendant's liability, and summary judgment was improper.
We therefore hold the invalidity of the underlying writs of attachment and execution are the proper subject of a collateral attack. The record discloses that the writs were of no effect because of plaintiff's failure to comply with section 27-18-405, MCA, and section 25-13-501, MCA. As a result the District Court was in error in finding Garnett Loberg in contempt, and the contempt order has no preclusive effect on the litigation of the present case.
The judgment of the District Court is reversed and the cause remanded to the District Court for further proceedings consistent with this opinion.
DALY, HARRISON, SHEA and SHEEHY, JJ., concur.
