
796 S.W.2d 692 (1990)
MATTHEWS CONSTRUCTION COMPANY, INC., Petitioner,
v.
Harvey ROSEN and Houston Pipe & Supply Company, Respondents.
No. C-9216.
Supreme Court of Texas.
September 12, 1990.
Rehearing Overruled October 3, 1990.
B. Lee Ware, Frank W. Mitchell, Houston, James Parsons, Palestine, Michael D. Matthews, Beaumont, for petitioner.
W. James Kronzer, Sydney N. Floyd, Hervert Neil Lackshin, Houston, for respondents.

OPINION
SPEARS, Justice.
This cause involves piercing the corporate veil and the application of limitations. Matthews Construction Company sued Houston Pipe & Supply Company for breach of contract and secured a judgment against Houston Pipe in July 1982. Because Matthews was unable to collect on that judgment, it filed suit in February 1984 against Harvey Rosen, the president and sole shareholder of Houston Pipe. Matthews contended that Rosen had stripped Houston Pipe of its assets in order to avoid paying the judgment. A jury found that Houston Pipe was the alter ego of Rosen and that Rosen had operated the company as a sham to perpetrate a fraud *693 on Matthews; the jury awarded Matthews $500,000 in actual damages and $60,000 in punitive damages. The trial court disregarded the punitive damages award and rendered judgment for Matthews for $470,562, the amount owing on the prior judgment. The court of appeals effectively reversed the trial court's judgment and rendered a take-nothing judgment against Matthews. 777 S.W.2d 434. We reverse the judgment of the court of appeals and affirm that of the trial court.
At issue is whether Matthews' suit against Rosen is barred by limitations. In Gentry v. Credit Plan Corp., 528 S.W.2d 571 (Tex.1975), we held that suit against a corporation tolls limitations as to the alter ego of the corporation. However, in Gentry the plaintiffs were bringing alter ego defendants into the same suit; here the plaintiffs have brought a second suit against the alter ego.[1] This distinction raises a question because, by footnote in Gentry, we stated: "We are not suggesting that under our practice a defendant may be added by the trial court after a judgment has become final on appeal." 528 S.W.2d 575 n. 2.
Based on this footnote, the court of appeals concluded that Gentry would not allow for a second suit against an alter ego after limitations had run. The court then reasoned that Matthews' suit against Rosen, filed in February 1984, was barred by limitations because the underlying breach of contract had occurred in 1979.
There is no great mystery surrounding the Gentry footnote. When read in context, its meaning is apparent. The footnote is linked in text to a citation to Mirabito v. San Francisco Dairy Co., 8 Cal. App.2d 54, 47 P.2d 530 (1935, appeal denied), a case in which the name of an alter ego was simply added to a judgment after that judgment was final on appeal. Thus, Gentry cites Mirabito for the substantive proposition that suit against a corporation will toll limitations as to the alter ego, but the footnote makes clear that Texas courts cannot use the same procedural device as was used in Californiai.e., Texas courts cannot simply add the name of an alter ego to a judgment that is final. The Gentry footnote was not addressed to the possibility of a second lawsuit seeking a second judgment.
In order to decide this question, we consider the policies underlying the decision to toll limitations in Gentry. What we said was this:
The purpose of the court in cases of this nature is to prevent use of the corporate entity as a cloak for fraud or illegality or to work an injustice, and that purpose should not be thwarted by adherence to any particular theory of liability.
528 S.W.2d at 575. Thus, the Gentry decision to toll limitations was based on the same equitable considerations that allow for piercing the corporate veil generally. See Castleberry v. Branscum, 721 S.W.2d 270, 271-73 (Tex.1986) (discussing at least six bases for disregarding the corporate form). When the corporate form is used as an essentially unfair devicewhen it is used as a shamcourts may act in equity and disregard the usual rules of law in order to avoid an inequitable result. See id.; see also H. Ballantine, Ballantine on Corporations § 122 (rev. ed. 1946) ("The use of the entity privilege of separate capacities is at all times subject to limitations of an equitable nature to prevent the privilege from being exercised or asserted for illegal, fraudulent or unfair purposes by those claiming under it, and courts of law and equity will interpose to prevent its abuse as the situation may require.") (emphasis added). Thus, in Castleberry, the court disregarded the usual rules concerning the separate nature of corporate entities, and in Gentry, the court disregarded the usual rules concerning limitations. In both instances the court took a "flexible" approach and focused on doing equity in order to prevent an unfair abuse of the corporate form. See Castleberry, 721 S.W.2d at 273 ("Because disregarding the *694 corporate fiction is an equitable doctrine, Texas takes a flexible, fact-specific approach focusing on equity.").
A statute of limitations serves primarily to compel the assertion of a cause of action within a reasonable time so that the opposing party has a fair opportunity to defend while witnesses are available. Moreno v. Sterling Drug, Inc., 787 S.W.2d 348, 351 (Tex.1990). It prevents the bringing of stale claims. Robinson v. Weaver, 550 S.W.2d 18, 20 (Tex.1977). Matthews' claim against Houston Pipe is not stale because Matthews has already pursued that claim to judgment. Neither is Matthews' claim against Rosen stale because Rosen is simply Houston Pipe's "other self"he is not a legally separate entity from Houston Pipe. See Gentry, 528 S.W.2d at 575. To apply limitations under these circumstances would fail to serve the underlying purpose of limitations and instead would be a purely formal exercise. See Hennessey's Tavern v. American Air Filter, 204 Cal.App.3d 1351, 251 Cal.Rptr. 859, 863 (1988) (issue of a stale claim could not be asserted by alter ego).
At the same time, if we were to apply limitations under these circumstances, it would effectively permit the corporate form to be used as a "cloak for fraud." See Gentry, 528 S.W.2d at 575. We will not permit the law to be used for unlawful ends. The same considerations that justified tolling limitations in Gentry also justify tolling limitations under the circumstances presented here. We therefore hold that once Matthews filed suit against Houston Pipe in June 1979, limitations was tolled as to Houston Pipe's alter ego until final judgment.[2] Because the running of limitations was tolled during the pendency of Matthews' suit against Houston Pipe, Matthews' suit against Rosen is not barred.[3]
Having disposed of this cause on the ground that limitations was tolled, we need not address Matthews' points of error directed at other aspects of the court of appeals' opinion. We have, however, considered Rosen's cross-point and conclude that it is without merit. Rosen has asserted that, because he and the corporate entity are one, res judicata bars the second suit against him. However, the doctrine of res judicata serves as a bar to subsequent collateral attacks on a final judgment. Segrest v. Segrest, 649 S.W.2d 610 (Tex.1983), cert. denied 464 U.S. 894, 104 S.Ct. 242, 78 L.Ed.2d 232 (1983). Its purpose is "to preserve the sanctity of judgments." Abbott Laboratories v. Gravis, 470 S.W.2d 639, 642 (Tex.1971). Matthews' suit against Rosen does not constitute a collateral attack on the judgment against Houston Pipe; to the contrary, Matthews is attempting to enforce that judgment. To apply res judicata in the manner argued by Rosen would be to pervert the sanctity of judgments, not preserve them. Matthews is entitled to collect its 1982 judgment as against Rosen.
We reverse the judgment of the court of appeals and affirm that of the trial court.
NOTES
[1]  For purposes of discussion, we refer to Matthews' suit as an "alter ego" suit; however the mere fact that a corporation operates as an alter ego does not give rise to a separate and independent cause of action and this opinion should not be so construed.
[2]  In holding otherwise, the court of appeals relied on Gallagher v. Bintliff, 740 S.W.2d 118 (Tex.App.Austin 1987, writ denied), another case in which the plaintiff was seeking to collect from an alter ego. However, in Gallagher, the record reflects that plaintiff had filed against the alter ego McClure Bintliff at the same time that she filed the original suit against the corporate entity. Plaintiff's original claim against Bintliff was dismissed with prejudice, and therefore, her subsequent suit against Bintliff was barred by res judicata regardless of any limitations question. See Van Dyke v. Boswell, O'Toole, Davis & Pickering, 697 S.W.2d 381 (Tex. 1985). In any event, our denial of the writ is no indication that this court approved the opinion of the court of appeals. See Tex.R.App.P. 133(a).
[3]  In some jurisdictions, the limitations period for such an alter ego suit would be the same as for a suit to enforce a judgment. E.g., Wm. Passalacqua Builders, Inc. v. Resnick Developers South, Inc., 608 F.Supp. 1261 (S.D.N.Y.1985) (applying twenty-year statute under New York law); Belleville v. Hanby, 152 Mich.App. 548, 394 N.W.2d 412 (1986). In Texas, that period is ten years. However, because Matthews' suit against Rosen is within the 4-year statute of limitations, we need not now consider whether the limitations period should be ten years instead of four.
