
171 Wis.2d 730 (1992)
Eugene PARKS, Petitioner-Appellant,
v.
CITY OF MADISON, Mayor Paul R. Soglin, and John C. Hamilton, Human Resource Director of the City of Madison, Respondents-Respondents.[]
No. 92-0412.
Court of Appeals of Wisconsin.
Submitted on briefs August 6, 1992.
Decided October 22, 1992.
*732 For the petitioner-appellant the cause was submitted on the briefs of James R. Bittorf of Milwaukee.
For the respondents-respondents the cause was submitted on the brief of Michael J. Modl and Bradley D. Armstrong of Axley Brynelson of Madison.
Before Eich, C.J., Dykman and Sundby, JJ.
EICH, C.J.
Eugene Parks appeals from an order dismissing a mandamus action in which he sought reinstatement to his former position as Affirmative Action Officer for the City of Madison. He raises a single issue: whether a prior action, in which Parks sued the city in federal court, claiming that his removal violated his federal and state rights, bars his present state action under principles of res judicata.
*733 We conclude that the present suit is not barred by Parks's earlier action in federal court. And while Parks has indeed launched an avalanche of litigation against the city in the wake of his firing, none may be said to have resulted from that "transaction." As a result, we reach a similar conclusion with respect to two earlier state-court actions Parks brought against the city, and we reverse the trial court's order.
The facts are undisputed. Parks served as Madison's affirmative action officer from July 1, 1985, until October 6, 1988, when he was suspended by the mayor. On November 16, 1988, Parks was removed from office.
Following his removal, Parks brought four separate suits against the city. The first, filed in state court on June 21, 1989, while his administrative appeal from the termination was still pending, sought to enjoin the city from appointing his permanent successor. He claimed that to replace him while he was pursuing his administrative remedies violated the ordinances providing for such an appeal. The circuit court eventually dismissed the action.
Parks filed a second action in June, 1989, this one in federal court, alleging that his suspension and removal violated his federal civil rights and was also improper under Wisconsin law. Prior to trial, the district court granted the city's motion for summary judgment on the federal claims and dismissed the pendent state claims without prejudice.
In July, 1989, Parks filed another state-court action seeking reinstatement not to his position as affirmative action officer but to a civil service position he had held in city government prior to accepting the affirmative action post. He claimed that he had taken a leave of absence from the civil service position and that city ordinances gave him the right to return to that job. He *734 ultimately prevailed in that action and was ordered reinstated to his former position.
Parks filed the present action in March, 1991, claiming that the city had improperly removed him from the position of affirmative action officer. He seeks reinstatement to that position, together with back pay, future salary, lost earnings, interest, and compensation for lost benefits. As indicated, the circuit court dismissed the action, concluding that it was barred by the prior federal action under the doctrine of res judicata, and Parks appeals.

Res Judicata Effect of Federal Action
Parks argues that the trial court erred when it concluded that the prior federal action was res judicata on the claims underlying the present lawsuit. He claims that because federal courts will decline to exercise jurisdiction over pendent state claims when the federal claims are dismissed, his federal action cannot be held to bar this one; and, while it is a question of first impression in Wisconsin, Parks's position finds considerable support in other jurisdictions.
[1]
The general principles of the doctrine of res judicata are well known and well accepted, if not always easy to apply. The rule reflects two important policies: encouraging the finality of judgments and preventing repetitive litigation. See Estate of Radocay, 30 Wis. 2d 671, 675, 142 N.W.2d 224, 226 (1966). Accordingly, the rule bars relitigation of the same cause of action between the same parties where the first litigation resulted in a valid, final judgment on the merits. Juneau Square Corp. v. First Wis. Nat'l Bank, 122 Wis. 2d 673, 682, 364 N.W.2d 164, 169 (Ct. App. 1985). In order for the first *735 action to bar the second, however, there must be an identity of parties and an identity of the causes of actions or claims in the two cases. DePratt v. West Bend Mut. Ins. Co., 113 Wis. 2d 306, 311, 334 N.W.2d 883, 885 (1983).
[2, 3]
Wisconsin has adopted the "transactional analysis" of the RESTATEMENT (SECOND) OF JUDGMENTS § 25 cmt. a (1982), as a guide for applying the rule. Depratt, 113 Wis. 2d at 311, 334 N.W.2d at 886. Under this analysis, all claims arising out of one transaction or factual situation are treated as being part of a single cause of action, and they are required to be litigated together. Juneau Square, 122 Wis. 2d at 682, 364 N.W.2d at 169. "Application of the rule of res judicata does not depend upon actual litigation of an issue. The earlier judgment is conclusive as to `all matters which were litigated or which might have been litigated' in that proceeding." Jantzen v. Baker, 131 Wis. 2d 507, 512, 388 N.W.2d 660, 662 (Ct. App. 1986) (quoting DePratt, 113 Wis. 2d at 310, 334 N.W.2d at 885). (Emphasis from Jantzen.)
[4]
Thus, if the present claim arose out of the same "transaction" as that involved in the former action, it is barred "even though [the plaintiff] is prepared in the second action: (1) to present evidence or grounds or theories of the case not presented in the first action; or (2) to seek remedies or forms of relief not demanded in the first action." DePratt, 113 Wis. 2d at 312, 334 N.W.2d at 886.
Parks concedes that the present suit arises from the same transaction as that involved in the federal action; there is, therefore, no issue as to the identity of the parties or claims. He argues, however, that his action is *736 not barred because it fits an exception to the RESTATEMENT rule providing that:
If . . . the court in the first action would clearly not have had jurisdiction to entertain the omitted theory or ground (or, having jurisdiction, would clearly have declined to exercise it as a matter of discretion), then a second action in a competent court presenting the omitted theory or ground should be held not precluded. RESTATEMENT (SECOND) OF JUDGMENTS § 25 cmt. e (1982) (emphasis added).
This exception is explained in the context of successive federal and state actions in an illustration to the text:
A commences an action against B in a federal court for treble damages under the federal antitrust laws. After trial, judgment is entered for the defendant. A then seeks to commence an action for damages against B in a state court under the state antitrust law grounded upon substantially the same business dealings as had been alleged in the federal action. Even if diversity of citizenship . . . did not exist, the federal court would have had "pendent" jurisdiction to entertain the state theory. Therefore unless it is clear that the federal court would have declined as a matter of discretion to exercise that jurisdiction, . . . the state action is barred. RESTATEMENT (SECOND) OF JUDGMENTS § 25 cmt. e, illus. 10 (1982) (emphasis added).
The illustration derives from United Mine Workers v. Gibbs, 383 U.S. 715, 725-27 (1966), where the court stated:
Pendent jurisdiction [over a state claim] exists whenever there is a [federal] claim . . . and the relationship between that claim and the state claim permits the *737 conclusion that the entire action . . . comprises but one . . . "case." The federal claim must have substance sufficient to confer subject matter jurisdiction on the court. The state and federal claims must derive from a common nucleus of operative fact . . . such that [the plaintiff] would ordinarily be expected to try them all in one judicial proceeding . . . . [Pendent jurisdiction] need not be exercised in every case in which it is found to exist. It has consistently been recognized that pendent jurisdiction is a doctrine of discretion, not a plaintiff's right . . . . Certainly, if the federal claims are dismissed before trial . . . the state claims should be dismissed as well . . . without prejudice and left for resolution to state tribunals. (Emphasis added.)
Based on Gibbs and the RESTATEMENT comments and commentary,[1] federal courts consistently have held that when a federal claim is dismissed on a motion for summary judgment, the exercise of sound discretion requires dismissal of the state claims as well, without prejudice to the plaintiff's right to litigate them in the proper state forum.[2] Most particularly, the Court of Appeals for the Seventh Circuit has stated that "[t]he *738 rule in pendent jurisdiction is that if the federal claim to which the state-law claim is pendent is dismissed before trial, the court will decline jurisdiction over the state-law claim and remit the claimant to the state courts." Cenco, Inc. v. Seidman & Seidman, 686 F.2d 449, 458 (7th Cir. 1982), cert. denied, 459 U.S. 880 (1982). See also Baltimore Orioles, Inc. v. Major League Baseball Players Ass'n, 805 F.2d 663, 682 (7th Cir. 1986), cert. denied, 480 U.S. 941 (1987) (" [W]hen the federal claims are disposed of before trial, the state claims should be dismissed without prejudice almost as a matter of course.").
[5]
Most state courts, too, have held that where it is clear that the federal court would have declined jurisdiction over related state claims which could have been raised in the federal action through pendent jurisdiction, but would have been dismissed, a later action in a state court on the state claims is not barred by res judicata.[3] We adopt that rule, and it requires reversal of the circuit court's decision on this issue.
*739 [6]
Here, the district court declined to entertain the pendent state claims raised in Parks's 1989 federal action, dismissing them without prejudice when it granted summary judgment dismissing the federal claims prior to trial. Thus, even if Parks had joined the precise state-law claims he raises in this action, the district court would not have considered them. It follows that the federal action does not bar the instant action on res judicata grounds.[4]


*740 Res Judicata Effect of Previous State Actions
As an alternative basis for affirming the trial court's decision, the city argues that Parks's prior state-court actions bar the present suit, because all arose out of the same transaction.
[7]
In order for two (or more) actions to comprise a single "transaction," they must arise from a "common nucleus of operative fact." Gibbs, 383 U.S. at 725. What constitutes a transaction in any given case is "to be determined pragmatically, giving weight to such considerations as whether the facts are related in time, space, origin, or motivation, whether they form a convenient trial unit, and whether their treatment as a unit conforms to the parties expectations." RESTATEMENT (SECOND) OF JUDGMENTS § 24(2) (1982). In determining whether the claims in the actions arise out of the same transaction, we have considered whether they arise out of the same conduct of the defendants, whether the facts set forth in both actions are essentially the same, and whether they could have been raised in the previous litigation. Juneau Square, 122 Wis. 2d at 684, 364 N.W.2d at 170.
[8]
Applying these principles, the trial court concluded that the present action was not barred by either of the previous actions. We agree.
Parks's first action challenging the appointment of his successor was filed while he was appealing his termination through the requisite administrative channels. He claimed that by replacing him while his administrative appeals were still pending, the city had violated his *741 right, guaranteed by city ordinances, to appeal his termination. It thus appears that he could not have attacked the process by which he was fired in the former case because he had not yet exhausted his administrative remedies. And his suit arose from the city's conduct in naming his successor after he left the position. It bore no relation to the city's acts in firing him and thus did not share a common "nucleus of operative fact" with the instant case, which challenges the process by which Parks was fired.
The same is true with respect to Parks's second state action, brought to force the city to reinstate him to the civil service position he held prior to his first being appointed to the affirmative action post. When appointed, he took a leave of absence from the civil service post, and he claimed that, under city ordinances, he was entitled to return to that position when he left (and however he left) the position of affirmative action officer;[5] and that was the operative fact in the case. It did not relate to the manner in which he was fired from the affirmative action post, or any remedies for that firingwhich is the crux of the instant action.
We conclude, therefore, that neither the earlier federal action nor Parks's two other state-court actions *742 against the city bar the particular challenge to his firing that he raises in this case.
By the Court.Order reversed.
NOTES
[]  Petition to review denied.
[1]  A reporter's note to the RESTATEMENT text provides:

"If in a given case it is clear that a federal court, applying the criteria elaborated in Gibbs, would not have entertained the state theory, the state action should not be barred."
RESTATEMENT (SECOND) OF JUDGMENTS § 25 commentary at 228 (1982).
[2]  See Davenport v. A.C. Davenport & Son Co., 903 F.2d 1139 (7th Cir. 1990); Federman v. Empire Fire and Marine Ins. Co., 597 F.2d 798 (2d Cir. 1979); Ouzts v. Maryland Nat'l Ins. Co., 470 F.2d 790 (9th Cir. 1972), modified, 505 F.2d 547 (9th Cir. 1974), cert. denied, 421 U.S. 949 (1975); Lomax v. Armstrong Cork Co., 433 F.2d 1277 (5th 1970); Soap Opera Now, Inc. v. Network Pub. Corp., 737 F. Supp. 1338 (S.D.N.Y. 1990); Sullivan v. Boettcher & Co., 714 F. Supp. 1132 (D. Colo. 1989); see also Gibbs, supra, at 736-37.
[3]  See, e.g., Terrell v. City of Bessemer, 406 So.2d 337 (Ala. 1981); Merry v. Coast Community College Dist., 158 Cal. Rptr. 603 (Cal. App. 1979); Maldonado v. Flynn, 417 A.2d 378 (Del. Ch. 1980); Puckett v. City of Emmett, 747 P.2d 48, 51 (Idaho 1987); Anderson v. Phoenix Investment Counsel of Boston, Inc., 440 N.E.2d 1164 (Mass. 1982); Capital Telephone Co., Inc. v. New York Telephone Co., 540 N.Y.S.2d 895, 898 (A.D.3 Dept. 1989); McLearn v. Cowen & Co., 455 N.E.2d 1256 (N.Y. 1983); Ron Tonkin Gran Turismo, Inc. v. Wakehouse Motors, Inc., 611 P.2d 658 (Or. App. 1980); Jeanes v. Henderson, 688 S.W.2d 100 (Tex. 1985); Sattler v. Bailey, 400 S.E.2d 220, 226-27 (W. Va. 1990).
[4]  The City of Madison contends that our decision in Juneau Square mandates a contrary result. The city first points to language in the decision suggesting that because the plaintiff in that case never asked the district court in a prior federal action to exercise pendent jurisdiction of its state claims, it would be "idle speculation" to assert, several years after the fact, that the district court would have declined to do so. 122 Wis. 2d at 685, 364 N.W.2d at 170. Seizing upon that language, the city argues that we cannot look backward to determine the pendent jurisdiction issue, and that where, as here, a plaintiff failed to plead the precise state claims in the earlier federal action, he or she should be barred from later pursuing them in state court. To rule otherwise, the city suggests, would encourage "a multiplicity of proceedings, harassment of defendants and the wasting of judicial resources"all results the res judicata rule is designed to prevent.

While we agree that Parks has consumed an unusual amount of judicial time and resources since his termination as the city's affirmative action officer, he has, as we discuss in this opinion, sought varying relief based on varying facts. And, with respect to the res judicata issue as it relates to his prior federal action, we do not see Juneau Square as compelling the result the city urges upon us. Indeed, we see the case as plainly distinguishable. The issues in Juneau Square were twice fully litigated at the federal level, whereas, as we have noted, Parks's federal action was dismissed on summary judgment in the pretrial stage of the case. Second, there is no need for us to "speculate" on the district court treatment of the pendent claims because the court in fact dismissed the case without deciding them, as the great majority of federal appellate decisions requires.
[5]  Madison, Wis., General Ordinance 3.36(17) provides in part that:

A permanent employee in the classified service appointed to a position in the unclassified service shall be granted leave of absence without pay from his former position in the classified service for the period of his service in the unclassified position and for one (1) year thereafter, during which time he shall be entitled to return to such former position or to one of equal responsibility and pay in the classified service without loss of seniority or civil service status ....
