This litigation arose out of a strike on the part of the members of the International Union of Mine, Mill and Smelter Workers against their employer, The New Jersey Zinc Company. The strike was of long duration.
Matters related to this strike already have been before this Court and decision made in New Jersey Zinc Co. v. Local 890 of International Union, etc., 1952, 56 N.M. 447, 245 P.2d 156. In this Court for decision at the present time are four other matters stemming from the same strike, being causes numbered 5579, 5587, 5626 and 5653.
The basic litigation in this series of cases was civil action numbered 12,812, filed June 12, 1951 in the District Court of Grant County, New Mexico, by The New Jersey Zinc Company, a corporation, plaintiff, v. Local 890 of International Union of Mine, Mill and Smelter Workers, its officers, agents and members, and International Union of Mine, Mill and Smelter Workers, its officers, agents and employees, defendants. The action was in equity, seeking a temporary restraining order enjoining defendants from trespassing on plaintiff’s property and from blocking roads and other entrances to the property of plaintiff in such a manner *629as to restrain or coerce employees of plaintiff from returning to work; prayer was made for an order to show cause why a preliminary injunction should not be issued until final hearing could be had on application for a permanent injunction.
On the same day, June 12, 1951, the trial court issued the temporary restraining order and set hearing upon the temporary injunction for June 20, 1951. Hearing on application for permanent injunction was set for the same time and place. The relevant portion of the temporary restraining order reads as follows:
“It is, therefore, by the Court, considered, ordered and adjudged that defendants and each of them be, and they are hereby enj oined and restrained, until the further order of this Court, from trespassing upon plaintiff’s property and blocking the roads and other entrances to the property of plaintiff in such manner as to restrain or coerce the employees of plaintiff from returning to work.”
Hearing was had June 21, 1951 through June 26, 1951 and, on June 30, 1951, the trial court, in letter form, gave its decision that the temporary restraining order should be made permanent and directed counsel to submit findings of fact, conclusions of law and a formal order.
On July 9, 1951 there were filed the findings of fact and conclusions of law of the trial court, and the order of the court granting permanent injunction, the relevant portion of which reads as follows:
“1. That defendants and each of them, and their wives, mothers, sisters and children as their agents, be and they are hereby permanently enjoined and restrained from trespassing upon plaintiff’s property and blocking the roads and other entrances to the property of plaintiff in such manner as to restrain, coerce or prevent the employees of plaintiff from returning to work, or from illegally attempting to keep said employees from continuing in theiremployment with plaintiff.”
No appeal was taken from nor was any attack made upon the decision in the trial court in this basic cause of action in equity.
The matters already decided and for decision in this Court all arose out of contempt proceedings initiated by reason of alleged violations by defendants of'the terms of the temporary restraining order and of the permanent injunction.
On July 11, 1951, two days after the permanent injunction, plaintiff filed its motion for an order to show cause, seeking to have defendants held in contempt for violation of the temporary restraining order; the' order was issued and hearing set for July 20, 1951. After hearing, and on July 23, 1951, the trial court gave its memorandum decision *630and entered its decree finding both the Local 890 and the International Union, and six individual defendants guilty of contempt, levying fines of $4,000 each against the two unions and sentencing the individuals to ninety days in jail. It was further provided that one-half of each fine was to be remitted provided defendants refrained from blocking the road, and jail sentences to be suspended provided the individuals refrained from the forbidden activities for one year commencing July 25, 1951. The relevant portion of the decree is as follows:
“3, That there be and hereby is assessed against defendant International Union of Mine, Mill and Smelter Workers a fine in the sum of Four Thousand ($4,000.00) Dollars to be paid to the Clerk of this Court; one-half of this fine will be remitted provided this defendant, its Officers, Agents and Employees refrain from blocking or causing to be blocked the road which is involved in this case that goes off the new Santa Rita highway west of the railroad through the premises of the plaintiff to Fierro, and refrain from otherwise violating the provisions of the Permanent Injunction of July 9, 1951, for a period of one year commencing July 25, 1951.
“4. That the defendants Clinton E. Jencks, Cipriano Montoya, Ernest Velasquez, Vincente Becerra, Pablo Montoya and Fred Barreras do each of them receive and they are hereby given a sentence of ninety (90) days in the common jail of Grant County, New Mexico; this sentence will be suspended provided said defendants and each of them cause the road which is involved in this case that goes off the new Santa Rita highway west of the railroad through the premises of the plaintiff up to Fierro to be opened to unobstructed travel by the general public and the officials and employees of plaintiff going to and returning from work, and otherwise cause the provisions of the Permanent Injunction of July 9, 1951 to be complied with by the members of said Local 890, its members and agents, for a period of one year commencing July 25, 1951.”
Appeal was taken and the decree in the contempt proceedings was affirmed in New Jersey Zinc Co. v. Local 890 of International Union, etc., supra. This particular contempt decree, however, is still before this Court on writ of error, cause numbered 5579, 57 N.M. 627, 261 P.2d 654, and writ of habeas corpus, cause numbered 5587, the latter cause being the.subject of this decision.
Although causes numbered 5626 and 5653 in this Court are not here decided and will be the subject of separate opinions, 57 N.M. 617, 261 P.2d 648, 57 N.M. 626, 261 P.2d 654 reference will be made to the foregoing *631■statement and, for the sake of clarity, their positions in the history of the litigation arising out of the strike should be made clear at this time.
Cause numbered 5653 arises out of another motion for order to show cause filed December 5, 1951, seeking to have defendants held in contempt for violation of the permanent injunction of July 9, 1951, the alleged violations occurring July 10 to December 5 inclusive, 1951; hearing was had during the period January 14, 1952 and January 31, 1952. The trial court’s decree was entered March 10, 1952 finding the defendants guilty of contempt and levying specific fines in varying amounts, totalling $31,870, in part against the unions and in part against specific individuals, to be paid to the clerk of the court for the use and benefit of the plaintiff as compensation for its losses and damages by reason of the violation of the permanent injunction. Appeal was granted, which matter constitutes cause numbered 5653 in this Court.
Cause, numbered 5626 arises out of another motion for order to show cause filed December 18, 1951, seeking to have defendants held in contempt for violation of the permanent injunction of July 9, 1951, the alleged violations occurring December 6 through December 18, inclusive, 1951; hearing was had February 28 and 29, 1952; decision of the trial court was rendered March 10, 1952, finding the defendants guilty of contempt and levying specific fines in varying amounts, totalling $5,720, in part against the unions and in part against specific individuals, to be paid to the clerk of the court for the use and benefit of the plaintiff as compensation for its losses and damages by reason of the violation of the permanent injunction. Appeal was granted, which matter constitutes cause numbered 5626 in this Court.
Basically, the grounds of appeal in causes numbered 5653 and 5626 .are identical; in an abbreviated form, they are: The strike, out of which all of this litigation arose, was settled between January 22 and January 28, 1952, during a recess in the trial of cause numbered 5653, and several weeks prior to the trial of cause numbered 5626; the picket line was withdrawn; the labor dispute between the parties having been terminated and the picket line having been removed, the cause for the original injunction ceased to exist, and it is contended that the trial court was without jurisdiction to proceed with the civil contempt proceedings which culminated in the two contempt decrees of March 10, 1952. It is also contended that the trial court erred in awarding plaintiff relief in the form of compensatory damages.
The legal questions raised in causes numbered 5653 and 5626 differ entirely from those raised in the writs of error and habeas corpus, the latter of which is the subject of this opinion and which is now considered.
*632The matter of the writ of habeas corpus will be determined first because, if this Court should find in favor of the applicants, the reason for the writ of error and a review of the contempt proceedings no longer exists, and the questions raised therein need not be decided.
New Jersey Zinc Co. v. Local 890 of International Union, etc., supra, affirmed the contempt decree of July 23, 1951, the relevant portions of which are quoted above; upon the filing of the mandate, the trial court appointed three attorneys amici curiae, and issued an order requiring applicants to show cause, on September 5, 1952, why the order suspending their sentences should not be revoked for violation of the suspension order. Applicants first challenged the power of the court to inflict criminal punishment in a civil suit in equity. Upon an adverse ruling, hearing was had at which applicants took the stand and categorically denied the violations. The trial court then made an order revoking the suspension and sentencing each of the applicants to ninety days in the Grant County jail. Motion for an appeal to the Supreme Court was denied and, on this writ of habeas corpus, applicants challenge the validity of both the original decree of contempt of July 23, 1951, and the judgment revoking the suspension. Their petition for the writ was filed in this Court September 30, 1952, and the writ issued from this Court on the same date, releasing the applicants, subject to the further order of this Court and subject to further imprisonment, should this Court so direct.
There are two principal questions to be answered:
(1) Are petitioners in this proceedings for writ of habeas corpus foreclosed from raising the issues here involved by reason of the fact that they could have been raised, and were not, in the appeal from the contempt order of July 23, 1951 affirmed by this Court in New Jersey Zinc Co. v. Local 890 of International Union, etc., supra?
(2) 'The answer to the first question must be determined by the answer to the second question: Was the particular contempt order of July 23, 1951 simply irregular and improvident, or was it so in excess of the power of the court as to result in a failure of jurisdiction? The law is settled on the principle that irregularity or improvidence in the judgment of a lower court must be raised by appeal, and failure to do so ends the matter; there can be no collateral attack. It is equally well settled that a failure of jurisdiction can be raised at any time and in any proceedings. And whether the matter ended in the trial court or in a court of last appeal, lack of jurisdiction in the original cause is subject to collateral attack. Citation of authority for these general propositions of law is unnecessary.
It is apparent then that the answer to the first question is dependent upon the answer to the second. If there were a fail*633ure of jurisdiction, the right to habeas corpus is not arbitrarily barred by the proceedings in New Jersey Zinc Co. v. Local 890 of International Union, etc., supra.
It is conceded that the contempt proceedings which resulted in the order of July 23, 1951, was a civil contempt action as distinguished from a criminal contempt action. Paragraphs 3 and 4 of this order are quoted above. They involve a fine against the defendant unions payable to the clerk of the court, one-half to be remitted on certain conditions, and ninety-day jail sentences against individual defend.ants, suspended on certain conditions. Only the matter of imprisonment is here involved.
Since this is admittedly a civil contempt proceedings, the first question is whether the “sentence” was a proper one and, second, if improper, to what extent: Was it simply error to be corrected on appeal, or was it so defective as to constitute a complete failure in jurisdiction?
“Contempts are neither wholly civil nor altogether criminal. And ‘it may not always be easy to classify a particular act as belonging to either one ■of these two classes. It may partake of the characteristics of both.’ Bessette v. W. B. Conkey Co., 194 U.S. 328, 329, 24 S.Ct. 665, 48 L.Ed.  1002. But in either event, and whether the proceeding's be civil or criminal, there must be an allegation that in contempt of court the defendant has disobeyed the order, and a prayer that he be attached and punished therefor. It is not the fact of punishment, but rather its character and purpose, that often serve to distinguish between the two classes of cases. If it is for civil contempt the punishment is remedial, and for the benefit of the complainant. But if it is for criminal contempt the sentence is punitive, to vindicate the authority of the court. It is true that punishment by imprisonment may be rémedial as well as punitive, and many civil contempt proceedings have resulted not only in the imposition of a fine, payable to the complainant, but also in committing the defendant to prison. But imprisonment for civil contempt is ordered where the defendant has refused to do an affirmative act required by the provisions of an order which, either in form or substance, was mandatory in its character. Imprisonment in such cases is not inflicted as a punishment, but is intended to be remedial by coercing the defendant to do what he had refused to do. The decree in such *634cases is that the defendant stand committed unless and until he performs the affirmative act required by the court’s order.
“For example: If a defendant should refuse to pay alimony, or to surrender property ordered to he turned over to a receiver, or to make a conveyance required by a decree for specific performance, he could be committed until he complied with the order. Unless there were special elements of contumacy, the refusal to pay or to comply with the order is treated as being rather in resistance to the opposite party than in contempt of the court. The order for imprisonment in this class of cases, therefore, is not to vindicate the authority of the law, but is remedial, and is intended to coerce the defendant to do the thing required by the order for the benefit of the complainant. If imprisoned, as aptly said in [In] Re Nevitt, 8 Cir., 117 F.  451, ‘he carries the keys of his prison in his own pocket.’ He can end the sentence and discharge himself at any moment by doing what he had previously refused to do.
“On the other hand, if the defendant does that which he has been commanded not to do, the disobedience is a thing accomplished. Imprisonment cannot undo or remedy what has been done, nor afford any compensation for the pecuniary injury caused by the disobedience. If the sentence is limited to imprisonment for a definite period, the defendant is furnished no-key, and he cannot shorten the term by promising not to repeat the offense. Such imprisonment operates not as a remedy coercive in its nature, but solely as punishment for the completed act of disobedience.
“It is true that either form of imprisonment has also an incidental ef-* feet. For if the case is civil and the punishment is purely remedial, there is also a vindication of the court’s authority. On the other hand, if the proceeding is for criminal contempt and the imprisonment is solely punitive, to vindicate the authority of the law, the complainant may also derive some incidental benefit from the fact that such punishment tends to prevent a repetition of the disobedience. But such indirect consequences will not change imprisonment which is merely coercive and remedial, into that which is solely punitive in character, or vice versa.
“The fact that the purpose of the punishment could be examined with a view to determining whether it was civil or criminal is recognized in Doyle v. London Guarantee & Acci. Co., 204 U.S.  605, 607, 27 S.Ct. *635313, 51 L.Ed.  644, 645, where it was said that ‘while it is true that the fine imposed is not made payable to the opposite party, compliance with the order relieves from payment, and in that event there is no final judgment of either fine or imprisonment. * * The proceeding is against a party, the compliance with the order avoids the punishment, and there is nothing in the nature of a criminal suit or judgment imposed for public purposes upon a defendant in a criminal proceeding.’ Bessette v. W. B. Conkey Co., 194 U.S.  328, 24 S.Ct. 665, 48 L.Ed.  1002; In re Nevitt, 8 Cir., 117 F. 448; Howard v. Durand, 36 Ga.  359; Phillips v. Welch, 11 Nev. 187.
“The distinction between refusing to do an act commanded (remedied by imprisonment until the party performs the required act), and doing an act forbidden (punished by imprisonment for a definite term), is sound in principle, and generally, if not universally, affords a test by which to determine the character of the punishment.
“In this case the alleged contempt did not consist in the defendant’s refusing to do any affirmative act required, but rather in doing that which had been prohibited. The only possible remedial relief for such disobedience would have been to impose a fine for the use of complainant, measured in some degree by the pecuniary injury caused by the act of disobedience. Rapalje [on] Contempt, §§ 131-134; Wells Fargo & Co. v. Oregon Ry. & Nav. Co., 9 Cir., 19 F. 20; In re North Bloomfield Gravel Mining Co., 9 Cir., 27 F. 795; Sabin v. Fogarty, 70 F.  483.
“But when the court found that the defendants had done what the injunction prohibited, and thereupon sentenced them to jail for fixed terms of six, nine, and twelve months, no relief whatever was granted to the complainant, and the Buck’s Stove & Range Company took nothing by that decree.”
We have quoted Mr. Justice Lamar at length because this opinion and its reasoning fully express the theory of appellants and, as late as 1947 in the case of United States v. United Mine Workers, 1947, 330 U.S. 258, 67 S.Ct. 677, 91 L.Ed. 884, opinions by a majority of the members of the United States Supreme Court cite the Gompers case many times and always with approval.
The Gompers case, and there are other good authorities, has been taken to say that a civil contempt proceeding cannot result in an imprisonment for a definite period of time. If this is literally true, then the sentence here involved, which will now *636result in imprisonment for ninety days, was necessarily in error. The theory in support of this contention is, of course, that the imprisonment can he only punishment for a past act and, therefore, improper in civil contempt. The argument is logical and the language of the Gompers case supports it.
In our judgment, however, the Gompers case does not pass upon the question before us. The suspended sentence here imposed raises a problem of first impression here and elsewhere in the United States insofar as the research of the parties and of this Court can determine. There are no cases in which a Court has sought to impose a suspended sentence of imprisonment for a definite term for civil contempt. After careful study, it is our conclusion that such a sentence is a proper one.
In the Gompers case, Mr. Justice Lamar was dealing with a civil contempt decree in which the trial court, having found a violation of its order, then and there sentenced three individuals to imprisonment for twelve, nine and six months respectively. We agree that this could be punishment only for a past act and was, therefore, erroneous.
Such is not the case before us. The picturesque phrase, “he carries the keys of his prison in his own pocket,” while expressing effectively a general principle of law, will not serve to determine all of the vast number of cases arising in the field of civil contempt. It is intended to express the idea that in a civil contempt action coercion must be the primary motive of the court’s action and the contemnor must be in a position to purge himself. This we believe to have been the case in the situation before us.
Since actions in contempt are sux generis, we are not forced into the technicalities of a strict application of either the criminal or the civil law. 12 Am.Jur. sec. 66 (Proceedings), p. 433; 17 C.J.S., Contempt, § 62 (Proceedings), page 71. “Suspended sentence,” in its usual sense, is a creature of criminal law. In a contempt case, we may consider the literal effect of the words used rather than be bound by the rules of criminal procedure.
Mr. Justice Lamar says:
“ * * * It is not the fact of punishment, but rather its character and purpose, that often serve to distinguish between the two classes of cases. * * * ”
As of the day this particular decree was entered, and it is that day which controls, the decree was truly coercive; as to the imprisonment for ninety days, there was no single one of the defendants unable to purge himself by obedience to' the court’s order. This we believe to be literally true and further believe it to satisfy the ancient *637test of “having the keys to the prison.” A phrase such as this must implement the law, not control it.
In taking' this position, this Court finds full authority in the case of United States v. United Mine Workers, supra, which is a landmark in our current legal history. It was an equity action in which the United States procured a preliminary injunction to prevent a union and its officers from precipitating a nation-wide strike in the bituminous coal mines pending judicial interpretation of a labor contract. Civil and criminal contempt proceedings for violation of the injunction were initiated in the equity suit. The trial court found defendants guilty of both civil and criminal contempt and imposed a fine of $10,000 on John L. Lewis and of $3,500,000 on the union. The Supreme Court, Mr. Chief Justice Vinson writing the majority opinion, modified the trial court’s decision on the ground that $3,500,000 was excessive as punishment for the criminal contempt already committed and, after reducing the criminal contempt fine to $700,000, stated the feeling and decision of the Court that:
“ * * * in order to coerce the defendant union into a future compliance with the court’s order, it would have been effective to make the other $2,-800,000 of the fine conditional on the defendants’ failure to purge itself within a reasonable time. Accordingly, the judgment against the defendant union is held to be excessive. It will be modified so as to require the defendant union to pay a fine of $700,000, and further, to pay an additional fine of $2,800,000 unless the defendant union, within five days after the issuance of the mandate herein, shows that it has fully complied with the temporary restraining order * * * and the preliminary injunction * * [330 U.S. 258, 67 S.Ct. 702.]
In this decision, the Supreme Court of the United States has used a conditional fine as a proper civil contempt sentence. Obviously, in the event of the failure of the union to obey and purge itself, the fine of $2,800,000 would become final and payment be enforced. At that time, the moment at which this penalty becomes final, it is primarily punitive; no one will contend, however, that for this reason the Supreme Court was in error in its decision and unable to enforce the fine in the event of continued disobedience. Mr. Justice Lamar in the Gompers case, in speaking of imprisonment and the incidental coercive or punitive éffects thereof, stated:
“ * * * But such indirect consequences will not change imprisonment which is merely coercive and remedial, into that which is solely punitive in character, or vice versa.”
All will admit that in a proper case either a fine or imprisonment may properly flow *638from a civil contempt action. In the instant case, we do not have the suspended or conditional fine of the Mine Workers case, but we do have the equivalent thereof, namely, a suspended term of imprisonment, in each case, at the time of pronouncement, the primary purpose was coercive ; in each case, the capacity to purge was- equally available. To find any difference in the cases is to submit to the force of'language and phrases having no true relevance. There is no substantial difference between a conditional fine for a sum certain and a conditional prison sentence for a time certain.
In reaching this conclusion, there comes to mind the possibility of an intemperate sentence on the part of a judge, momentarily outraged by the conduct of a contemnor. Protection' from this danger is available by appeal, as demonstrated by the action of the Supreme Court in the Mine Workers case, and best expressed in the opinion of Mr. Justice Black, stating the principle of law, “that in contempt proceedings courts should never exercise more than ‘the least possible power, adequate to the end proposed.’ ”
We hold that the sentence of the trial court was a proper one in this action for civil contempt. This conclusion makes unnecessary a decision of the other points raised. The trial court had jurisdiction of the parties and of the subject matter and, as we have just determined, had the power to impose the particular sentence. The decree in question was appealed and affirmed in this Court in New Jersey Zinc Co. v. Local 890 of International Union, etc., 1952, 56 N.M. 447, 245 P.2d 156, in which all of the questions here presented could have been presented and disposition made. The “law of the case” rule is applicable. Sanchez v. Torres, 1934, 38 N.M. 556, 37 P.2d 805, 811; 1 A.L.R. 725.
We are not unmindful of the language of this Court in its decision published this same day in a case also dealing with contempt of court arising out of the identical controversy. The emphasis there was placed upon the necessity of wise and temperate use of a court’s power to protect its dignity and authority. Equal emphasis can and must be placed upon the necessity of sustaining a proper use of that power when occasion demands. In the instant case, the record reveals that these individuals flagrantly violated the specific terms of the court’s order here involved; it is difficult to imagine a more open and complete disrespect and disregard for the orders of a trial court. Since the trial court has not exceeded its power, its decree should be enforced.
It is the direction of this Court that the writ of habeas corpus filed in this Court September 30, 1952, be dischargéd, and that the defendants and -each of them be forth*639with remanded to the custody of the Sheriff of Grant County, New Mexico.
It is so ordered.
SADLER, C. J., and McGHEE, COMPTON and LUJAN, JJ., concur.