
28 Cal.Rptr.3d 566 (2005)
129 Cal.App.4th 482
DAAR & NEWMAN, Plaintiff and Appellant,
v.
VRL INTERNATIONAL, Defendant and Respondent.
No. B173865.
Court of Appeal, Second District, Division Four.
May 16, 2005.
*569 David Daar, Los Angeles, for Plaintiff and Appellant.
Wilson, Elser, Moskowitz, Edelman & Dicker, Arlene N. Berger and Patrick M. Kelly, Los Angeles, for Defendant and Respondent.
HASTINGS, Acting P.J.
Appellant, the law firm of Daar & Newman, previously represented respondent, VRL International, Ltd., in a personal injury action. Because respondent had insufficient contacts with California for this state to assert jurisdiction over it, appellant successfully moved to quash service of process and obtained respondent's dismissal from the action. Appellant also successfully defended the trial court's ruling on appeal to this court.
Contending that it was not paid in full for the services it rendered on behalf of respondent in the prior action, appellant has filed this action for recovery of fees. Respondent filed a motion to quash contending it has no sufficient contacts with this state upon which jurisdiction may be based. The trial court granted the motion to quash, referencing our prior opinion and the doctrine of judicial estoppel. It then dismissed respondent from the action.
We conclude the trial court erred. The operative facts and law relating to this action are different from the prior action. The plaintiff in the prior action attempted to assert jurisdiction over respondent for injuries which occurred in connection with a personal watercraft accident in Nassau, the Bahamas. Here, appellant asserts jurisdiction to recover fees directly related to appellant's retention and representation of respondent in California. Because the claim arises directly from services rendered by appellant for respondent in California, limited jurisdiction exists for resolution of the claim.

FACTUAL BACKGROUND
The facts are undisputed. In the prior action, Los Angeles County Superior Court case No. BC196681, David Cuenllas sued respondent and others for personal injury resulting from injuries he sustained in a jet ski accident in the ocean off the Bahamas (the Cuenllas action). He alleged he had been a guest at the Breezes Hotel in Nassau, operated by respondent, and that he had been injured while riding a jet ski he rented from an operator adjacent to the hotel.
After process was served on respondent's agents in the Bahamas, appellant, a California law firm, was retained to represent respondent in the Cuenllas action. On behalf of respondent, appellant filed a motion to quash, which was supported by the declaration of Cameron Burnet, respondent's senior vice president. Essentially, "Burnet declared that respondent `owns the registered trademark `BREEZES'; is incorporated in the Cayman Islands with its principal place of business in the Bahamas; is not licensed or registered to conduct business in California; has never entered into any contract in California; does not pay taxes in the state; has no business or office or employees in California; has never owned or leased property in California; has never maintained a telephone or telefax number or address in California; has never designated an agent for service of process in California; has no officers or *570 directors residing in California; has never maintained business records in California; has never initiated litigation in California; and did not consent to personal jurisdiction in California.'"
Cuenllas opposed the motion. He asserted that he was on a business trip arranged by his company through an organization called Value Marketing. He learned about various recreational activities at the hotel through brochures and literature sent to him and others before they departed on the trip. Another declaration identified International Lifestyles, a Florida corporation, which solicited business on behalf of various "Breezes" resorts and "SuperClubs Resorts." Marketing occurred in California and other jurisdictions.
The trial court granted the motion to quash in the Cuenllas action: "`Based on the facts and circumstances of this case, this court lacks general or specific jurisdiction over [respondent], a Cayman Island corporation. Any purported advertising by [respondent] and/or International Lifestyles is insufficient as a matter of law and does not constitute sufficient minimum contacts. There is no substantial nexus between plaintiff's injuries and the purported advertising. The advertising does not operate to confer jurisdiction over [respondent] for the injuries suffered by plaintiff in the course of recreational activities occurring wholly outside the United States.'" In an unpublished portion of our opinion, we affirmed the trial court's ruling. (Cuenllas v. VRL International, Ltd. (Oct. 11, 2004, B138624) [nonpub. opn.].)
This action was filed by appellant on February 13, 2003, naming respondent and International Lifestyles as defendants.[1] Causes of action for breach of contract and common counts are alleged. The fifth cause of action for breach of contract, alleged against respondent, states: "That defendant authorized, permitted, allowed and accepted plaintiff law firm to be its attorney of record and to represent and defend defendant in a civil action on file in the Superior Court of the State of California, County of Los Angeles, Case No. BC 196 681. Plaintiff law firm continuously defended said defendant in said civil action and defendant agreed to pay the reasonable value of such services as were necessary to defend said defendant. [¶] ... On or about December, 2001, and continuing thereafter, defendant breached the agreement by ... [f]ailing to pay for the legal services necessarily performed as attorney of record in the defense of the civil action, Case No. BC 196 681, Los Angeles Superior Court.... [¶] ... Plaintiff suffered damages legally (proximately) caused by defendant's breach of the agreement ... as follows ...: Legal services performed for [respondent], as client, in the amount of Seventy-One Thousand Seven Hundred Sixty-Six dollars ($71,766.00)."
Respondent filed a motion to quash service of process in this action along with a request that the court take judicial notice of the minute order granting its motion to quash in Cuenllas and our opinion affirming the trial court in that same action. The motion was also supported by the declaration of respondent's Senior Vice President, Cameron Burnet, addressing the same factors relevant to the issue of general jurisdiction he addressed in the Cuenllas motion to quash.
Appellant's opposition to the motion to quash conceded there are insufficient contacts between respondent and California to establish general jurisdiction. It argued that specific jurisdiction existed for the *571 claims being made: "As to the second defendant, [respondent], California Courts have specific jurisdiction as to that Defendant for purposes of this lawsuit. That company [respondent] utilized the services of plaintiff, California lawyers, to enable it to defend its position that it should not have to litigate the multimillion dollar Cuenllas case here. The personal injury subject of the Cuenllas lawsuit occurred in the Bahamas at [respondent's] Breezes Hotel. [Respondent] spent years fighting before the Superior Court of California and then before the California Court of Appeal to avoid the exposure of litigating that case here."
After argument, the trial court ruled: "1. The Motion of [respondent], is GRANTED on the basis of the finding and holding of the Court of Appeal in the underlying Cue[n]llas action, as well as the doctrine of judicial estoppel and [respondent's] Opposing Brief." A notice of appeal was timely filed by appellant.

DISCUSSION
At the outset, we conclude that the trial court was wrong in relying upon our prior opinion as a basis for granting the motion to quash in this case. Whether the court's terse language was meant to refer to the doctrines of law of the case or res judicata, or each of them, neither apply here.
"If a case is first tried, and the judgment rendered is reversed on appeal, it will ordinarily be tried again.... [Citation.] And after retrial ..., another appeal may be taken. The doctrine of `law of the case' deals with the effect of the first appellate decision on the subsequent retrial or appeal: The decision of an appellate court, stating a rule of law necessary to the decision of the case, conclusively establishes that rule and makes it determinative of the rights of the same parties in any subsequent retrial or appeal in the same case. [¶] ... [¶] ... The doctrine applies only to a decision of an appellate court in the same case. Final decisions or rulings of a trial court in a separate case, or in various independent stages of a proceeding, are governed by the distinct principle of res judicata. [Citations.]" (9 Witkin, Cal. Procedure (4th ed. 1997) Appeal, §§ 895 & 896, pp. 928-930.) Because this is a separate and distinct case from Cuenllas, the doctrine of "law of the case" does not apply.
In general, "`[t]he doctrine of res judicata precludes parties or their privies from relitigating an issue that has been finally determined by a court of competent jurisdiction. [Citation.] "Any issue necessarily decided in such litigation is conclusively determined as to the parties or their privies if it is involved in a subsequent lawsuit on a different cause of action." [Citation.]'" (Nathanson v. Hecker (2002) 99 Cal.App.4th 1158, 1162, 121 Cal.Rptr.2d 773, quoting Levy v. Cohen (1977) 19 Cal.3d 165, 171, 137 Cal.Rptr. 162, 561 P.2d 252.)
Res judicata has a "dual aspect." "`In its primary aspect the doctrine operates as a bar to the maintenance of a second suit between the same parties on the same cause of action. Its secondary aspect comes into play in situations involving a suit, not necessarily between the same parties, based upon a different cause of action. There the prior judgment is not a complete bar but it operates against the party against whom it was obtained as an estoppel or conclusive adjudication as to those issues in the second action which were actually litigated and determined in the first action. [Citation.]'" (Risam v. County of Los Angeles (2002) 99 Cal. App.4th 412, 420, 121 Cal.Rptr.2d 267, quoting Knickerbocker v. City of Stockton *572 (1988) 199 Cal.App.3d 235, 242, 244 Cal. Rptr. 764, italics added.)
"`"Traditionally, collateral estoppel has been found to bar relitigation of an issue decided at a previous proceeding `if (1) the issue necessarily decided at the previous [proceeding] is identical to the one which is sought to be relitigated; (2) the previous [proceeding] resulted in a final judgment on the merits; and (3) the party against whom collateral estoppel is asserted was a party or in privity with a party at the prior proceeding.'" [Citations.]'" (Risam v. County of Los Angeles, supra, 99 Cal.App.4th at p. 420, 121 Cal.Rptr.2d 267, italics added.)
Before we proceed with our analysis, we note the distinctions between the concepts of general and specific jurisdiction and how they were treated in Cuenllas.
"Personal jurisdiction may be either general or specific. A nonresident defendant may be subject to the general jurisdiction of the forum if his or her contacts in the forum state are `substantial ... continuous and systematic.' [Citations.] In such a case, `it is not necessary that the specific cause of action alleged be connected with the defendant's business relationship to the forum.' [Citations.] Such a defendant's contacts with the forum are so wide-ranging that they take the place of physical presence in the forum as a basis for jurisdiction. [Citation.] [¶] If the nonresident defendant does not have substantial and systematic contacts in the forum sufficient to establish general jurisdiction, he or she still may be subject to the specific jurisdiction of the forum, if the defendant has purposefully availed himself or herself of forum benefits [citation], and the `controversy is related to or "arises out of" a defendant's contacts with the forum.' [Citations]." (Vons Companies, Inc. v. Seabest Foods, Inc. (1996) 14 Cal.4th 434, 445-446, 58 Cal.Rptr.2d 899, 926 P.2d 1085.)
In Cuenllas, we addressed both concepts. "Addressing the issue of specific jurisdiction first, we find none. The controversy at issue is a claim for damages for injuries resulting from a jet ski accident which occurred in the Caribbean ocean. While it is true that appellant's visit to the Breezes resort may have resulted from marketing activity as next discussed, there is no evidence of any nexus between the accident and the marketing activity. We cannot conclude that the controversy presented is either related to or arises out of any of respondent's contacts with California." (Cuenllas v. VRL International, Ltd., supra [nonpub. opn.], p. 9.) We then turned to the concept of general jurisdiction, which was argued by Cuenllas to be applicable based on marketing activity within the United States and California: "We cannot conclude that this activity is so '"substantial ... continuous and systematic" ... [that respondent's] contacts with [this] forum are so wide-ranging that they take the place of physical presence in the forum as a basis for jurisdiction.' [Citation.]" (Id. at pp. 10-11.)
Addressing this case, appellant is not arguing that general jurisdiction exists. Arguably, without new evidence, the ruling on this issue would preclude appellant from prevailing on such a claim. Appellant contends that specific jurisdiction exists for this action because the claim asserted here arises directly from respondent's retention of appellant to represent it in the Cuenllas action, not the same claim addressed in Cuenllas. There, the issue of specific jurisdiction was analyzed in the context of a personal injury claim arising from a jet ski accident in the Bahamas. Thus, while we are called upon to decide whether specific jurisdiction exists in this case, a similar issue addressed in the *573 Cuenllas case, the issue here is informed by a different legal claim and facts not before the court in Cuenllas. Thus, neither res judicata nor collateral estoppel is applicable.
"Judicial estoppel, sometimes referred to as the doctrine of preclusion of inconsistent positions, prevents a party from `asserting a position in a legal proceeding that is contrary to a position previously taken in the same or some earlier proceeding. The doctrine serves a clear purpose: to protect the integrity of the judicial process.'" (7 Witkin, Cal. Procedure (2005 supp.) Judgment, § 284A, p. 246, quoting Jackson v. County of Los Angeles (1997) 60 Cal.App.4th 171, 181, 70 Cal.Rptr.2d 96 (Jackson).) It is intended to prevent litigants from "`playing "fast and loose with the courts." [Citation.]'" (Jackson, supra, at p. 181, 70 Cal.Rptr.2d 96.) It is an "`extraordinary remed[y] to be invoked when a party's inconsistent behavior will otherwise result in a miscarriage of justice.' [Citation.]" (Ryan Operations G.P. v. Santiam-Midwest Lumber Co. (3rd Cir.1996) 81 F.3d 355, 365.)
Under California law, judicial estoppel applies when "(1) the same party has taken two positions; (2) the positions were taken in judicial or quasi-judicial administrative proceedings; (3) the party was successful in asserting the first position (i.e., the tribunal adopted the position or accepted it as true); (4) the two positions are totally inconsistent; and (5) the first position was not taken as a result of ignorance, fraud, or mistake." (Jackson, supra, 60 Cal.App.4th at p. 183, 70 Cal. Rptr.2d 96, italics added.)
Because appellant's argument for specific jurisdiction is based on a different claim and different facts, it is not inconsistent with the argument it made on behalf of respondent in the Cuenllas action. The trial court erred in relying on the concept of judicial estoppel.
Because we may affirm a trial court even if its rationale was wrong (Rappleyea v. Campbell (1994) 8 Cal.4th 975, 980-981, 35 Cal.Rptr.2d 669, 884 P.2d 126), we now address the merits of the motion to quash.
"When no conflict in the evidence exists, ... the question of jurisdiction is purely one of law and the reviewing court engages in an independent review of the record. [Citation.]" (Vons Companies, Inc. v. Seabest Foods, Inc., supra, 14 Cal.4th at p. 449, 58 Cal.Rptr.2d 899, 926 P.2d 1085.)
We review the case of Vorys, Sater, Seymour & Pease v. Ryan (1984) 154 Cal. App.3d 91, 200 Cal.Rptr. 858, a case similar to ours. There, an Ohio law firm, Vorys, Sater, Seymour & Pease (Vorys), was retained by a California law firm to represent its California clients, identified in the Court of Appeal opinion as Ryans, to intervene in a legal matter pending in Ohio. Vorys represented Ryans but Ryans was dissatisfied with Vorys over the fee it was charged for making an unsuccessful motion. Jeffrey Ryan, one of the clients, then went to Ohio and arranged a settlement of the suit. But he felt the papers prepared by Vorys were defective. Ryans refused to pay Vorys for the legal work it had performed. Vorys obtained a default judgment against Ryans in Ohio and then came to California and obtained a California judgment. Ryans moved to vacate the California judgment, contending Ohio lacked personal jurisdiction to render the original judgment. The motion was denied and Ryans appealed contending the Ohio court had no personal jurisdiction over them. The Court of Appeal disagreed:
"A defendant in an action to enforce a foreign judgment is permitted to show *574 `that the foreign judgment is in excess of jurisdiction,' except when the jurisdiction issue was expressly litigated in the foreign state. [Citation.] Vorys won a default judgment without the Ohio court ever hearing a challenge to jurisdiction.
"Ohio's long-arm statute allows service of process on a nonresident `who, acting directly or by an agent, has caused an event to occur out of which the claim which is the subject of the complaint arose, from the person's: (1) Transacting any business in this state....' [Citation.] California's long-arm statute contemplates a similar exercise of jurisdiction. [Citation.] Courts have interpreted subsection (1) of the Ohio statute as extending personal jurisdiction to its constitutional limits. [Citations.] The federal constitutional standard for a state to exercise personal jurisdiction over a party is that the party must have `certain minimum contacts with [the state] such that the maintenance of the suit does not offend "traditional notions of fair play and substantial justice."' [Citations.]
"A three-part test has been used to determine when a defendant has `minimum contacts' with a foreign state. `First, the defendant must purposefully avail himself of the privilege of acting in the forum state or causing a consequence in the forum state. Second, the cause of action must arise from the defendant's activities there. Finally, the acts of the defendant or consequences caused by the defendant must have a substantial enough connection with the forum state to make the exercise of jurisdiction over the defendant reasonable.' [Citations.]
"Ryans clearly availed itself of the privilege of acting in Ohio. Its intervention in the lawsuit between Chur and Halsted Arabians was voluntary; it was not legally compelled to appear in Ohio. It hired an Ohio law firm to do legal work in Ohio. This work was done at Ryans' request and for its benefit. The participation of Ryans and Vorys in settlement negotiations in Ohio further supports the conclusion the Ryan Group was transacting business there.
"To justify personal jurisdiction, a plaintiff need not show multiple transactions by defendant within a forum state; a single transaction of business within the state may constitute sufficient contact. [Citations.] Ryans' contract for legal services was sufficiently connected with Ohio so that Ohio's exercise of personal jurisdiction was reasonable. [Citation.]
"No California case has considered whether retaining an attorney in another state gives that state personal jurisdiction in subsequent disputes over attorneys' fees. Most reported cases from other states uphold the exercise of personal jurisdiction. [Citations.] We reach the same conclusion here."
(Vorys, Sater, Seymour & Pease v. Ryan, supra, 154 Cal.App.3d at pp. 93-95, 200 Cal.Rptr. 858, italics added.)
Applying the three-part test referenced in Vorys to the uncontradicted facts here, we have no problem reaching the conclusion that specific jurisdiction exists for resolution of appellant's claim for attorney fees against respondent.
First, respondent authorized the retention of appellant to represent it in the Cuenllas action. Appellant successfully represented respondent, invoking the benefits and protections of California law on respondent's behalf. We discern no ultimate significance in the fact that the clients in Vorys voluntarily intervened in the Ohio case, while here respondent voluntarily appeared to exonerate itself from jurisdiction of the California courts. As *575 the facts and discussion in Vorys indicate, respondent could have allowed a default judgment to be entered in California and later challenged jurisdiction when Cuenllas sought to enforce the judgment in a forum having jurisdiction over respondent. It did not do so. Instead, it elected to seek relief in the California courts, authorized the retention of appellant, and cooperated with appellant in obtaining the relief sought.
Second, appellant's claim is for attorney fees in connection with appellant's successful representation of respondent in the Cuenllas action. It thus arises out of and results from respondent's forum-related activity.
Third, it is reasonable to recognize limited jurisdiction under the circumstances. "A state may exercise specific jurisdiction over a nonresident who purposefully avails himself or herself of forum benefits, because the state has `a "manifest interest" in providing its residents with a convenient forum for redressing injuries inflicted by out-of-state actors. [Citation.]'" (Vons Companies, Inc. v. Seabest Foods, Inc., supra, 14 Cal.4th at p. 447, 58 Cal.Rptr.2d 899, 926 P.2d 1085.)
Appellant is a California law firm which provided valuable legal assistance to respondent. It would be unjust to allow an out-of-state corporation, even one which does not have adequate contacts with the state for establishment of general jurisdiction, to authorize retention of the California firm and then avoid paying the firm fees it claims due for activities undertaken on the corporation's behalf in California.

DISPOSITION
The order granting the motion to quash is reversed. The matter is remanded to the trial court with directions to deny the motion and recognize limited jurisdiction over respondent for purpose of this lawsuit. Costs are awarded to appellant.
We concur: CURRY, J., and WILLHITE, JR., J.
NOTES
[1]  A motion to quash was also filed by International Lifestyles but the court continued that matter to be heard at a later date. International Lifestyles is not a party to this appeal.
