GEE, Circuit Judge:
On this appeal we are asked to perform the initial review of a decision by the Texas Real Estate Commission that its rules, promulgated pursuant to the Texas Real Estate License Act,1 require licensure of employees of a rental information service who telephone landlords to obtain rental information, or to verify the continued accuracy of rental listings, or who describe the services offered by the rental information agency to prospective subscribers. Appellees contend that this interpretation of the Act and regulations promulgated thereunder violate their rights of commercial speech guaranteed by the first amendment. For the reasons set out below, we conclude that the district court should have abstained from considering the constitutionality of the statute’s interpretation by the state real estate licensing agency pending review of this administrative interpretation by the state agency or the state courts.
I.
Appellee United Home Rentals (UHR) is a Texas corporation that owns and operates a real estate rental information service.2 UHR places advertisements in newspapers indicating that real estate of a certain description is available for rent and listing the UHR office telephone number. Potential consumers may respond to the advertisement by calling UHR and requesting information about the property. The UHR employee who answers the telephone will inform the potential consumer that he must come to the office personally and purchase a “membership” or subscription to the service before any more information will be released. Payment of the membership fee entitles the customer to examine a catalogue of rental property information maintained by UHR which contains the names and addresses of owners or landlords.
According to the stipulated facts, UHR employees perform the following functions:
(1) Gathering rental information from landlords, classified ads, and other sources;
(2) Verifying the information on catalogued property and periodically checking its continued accuracy;
(3) Handling incoming telephone calls in response to ads or to give information regarding newly catalogued rental properties to subscribers;
(4) Explaining the information service and selling memberships to customers.
The same employee may perform one or more of these functions.
Approximately half of UHR’s employees, primarily those in supervisory and counseling positions, are licensed under the Texas Real Estate License Act (“the Act”). Section 2 of the Act defines the activities requiring licensure:
(2) “Real estate broker” means a person who, for another person and for a fee, commission, or other valuable consideration, or with the intention or in the expectation or on the promise of receiving or collecting a fee, commission, or other [326]*326valuable consideration from another person:
(A) sells, exchanges, purchases, rents, or leases real estate;
(B) offers to sell, exchange, purchase, rent, or lease real estate;
(C) negotiates or attempts to negotiate the listing, sale, exchange, purchase, rental, or leasing of real estate;
(D) lists or offers or attempts or agrees to list real estate for sale, rental, lease, exchange, or trade;
(E) appraises or offers or attempts or agrees to appraise real estate;
(F) auctions, or offers or attempts or agrees to auction, real estate;
(G) buys or sells or offers to buy or sell, or otherwise deals in options on real estate;
(H) aids, attempts, or offers to aid in locating or obtaining for purchase, rent, or lease any real estate;
(I) procures or assists in procuring of prospects for the purpose of effecting the sale, exchange, lease, or rental of real estate; or
(J) procures or assists in the procuring of properties for the purpose of effecting the sale, exchange, lease, or rental of real estate.
(3) “Broker” also includes a person employed by. or on behalf of the owner or owners of lots or other parcels of real estate, at a salary, fee, commission, or any other valuable consideration, to sell the real estate or any part thereof, in lots or parcels or other disposition thereof. It also includes a person who engages in the business of charging an advance fee or contracting for collection of a fee in connection with a contract whereby he undertakes primarily to promote the sale of real estate either through its listing in a publication issued primarily for such purpose, or for referral of information concerning the real estate to brokers, or both.
(4) “Real estate salesman” means a person associated with a Texas licensed real estate broker for the purposes of performing acts or transactions comprehended by the definition of “real estate broker” as defined in this Act.
Tex.Rev.Civ.Stat.Ann. art. 6573a § 2 (West Supp.1983) (emphasis added).
Section 6 of the Act specifies the licensing requirements:
(b) To be eligible for a license, an individual must ... satisfy the commission as to his honesty, trustworthiness, integrity, and competency. However, the competency of the individual, for the purpose of qualifying for the granting of licensure privileges, shall be judged solely on the basis of the examination referred to in Section 7 of this Act.
Tex.Rev.Civ.Stat.Ann. art. 6573a § 6 (West Supp.1983).
Section 7(a), Tex.Rev.Civ.Stat.Ann. art. 6573a § 7(a) (West Supp.1983), sets out nine “core real estate courses” that an applicant must have studied before he or she may take an examination for the real estate license. The core courses include subjects such as: principles of real estate, real estate appraisal, real estate law, real estate finance, real estate marketing, real estate mathematics, real estate brokerage, property management, and real estate investments.
Pursuant to the rulemaking power granted it in Section 2 of the Act, appellant Texas Real Estate Commission (“the Commission”) has enacted the following relevant regulations:
Rule 402.03.02
.003.4 Real estate broker licensure is required for the operation of a rental agency. This section does not prohibit employment of an answering service which is identified to callers as such and which provides information concerning the size, price and terms of property advertised.
.005.1 Locating and bringing together a buyer and seller through correspondence or telephone constitutes negotiation if done from within the borders of Texas.
005.5 Real estate licensure is required of rental agents doing all solicitation by [327]*327telephone unless such agents are employees of the owner of the property concerned.
.005.6 A clerical employee of a real estate broker is not required to be licensed if such employee engages in no solicitation work and does not hold himself or herself out as authorized to act as a real estate agent.
.005.7 Answering of the telephone and acts of a secretarial nature done in a broker’s office do not require real estate licensure.
.010.1 (a) Real estate licensure is required for the operation of an apartment selector/locator service or home-finding service in Texas.
.010.2 (b) The compilation and sale of listings of rental vacancies available in an area is activity requiring real estate licensure. This is true even if the property is not shown, sold, leased or managed.
.011.1 This section prohibits a person not licensed as a Texas real estate broker or salesman from receiving a referral fee from another concerning the sale, exchange, purchase, rental or lease of real estate.
.011.2 Real estate licensure is required for one to procure or assist in the procuring of prospective tenants of real property for compensation in any form, including but not limited to rent bonuses, discounts, gifts or other things of value.
.011.3 The referral of a prospective purchaser, for compensation, is an act requiring real estate licensure.
.013.1 Real estate licensure is required of those who advertise for others regarding real property, accept calls received in response to such advertisements, and refer the callers to the owner of the property-
The Commission has interpreted the Act and the regulations promulgated pursuant to it to require licensure of UHR employees performing the clerical tasks described above (i.e. gathering, verifying and distributing rental information). Accordingly, the Commission has commenced administrative proceedings to revoke the licenses of appellees Livingston and Bushman on the grounds that they had associated with unlicensed persons who had performed acts requiring a license.3 Pursuit of these administrative actions has been deferred until the present litigation is resolved. Also, the Commission initially denied applications for licenses by three UHR employees on the ground that they misrepresented their activities as UHR employees in their applications.4 However, during the pendency of this appeal, these licenses have in fact been issued.
In a previous federal action, UHR challenged the statute and regulations as applied on first amendment and equal protection grounds. Applying a due process analysis, the district court in that case ruled that the regulations did encompass UHR’s activities, and that as applied to UHR, the regulations bore a rational relationship to the legitimate state goal of consumer protection. United Home Rentals, Inc. v. Texas Real Estate Commission, No. CA 3-80-0485-F (N.D.Tex. April 16, 1981) (“UHR I”). The court refused to consider UHR’s first amendment argument.
UHR then refiled in the same federal district court,5 mounting the same first amendment and equal protection attacks on the statute as applied. Without any reference to the earlier action, the district court below ruled that the statute and regulations encompassed UHR’s activities, and [328]*328that as applied the statute violated UHR’s first amendment rights of commercial speech. United Home Rentals v. Texas Real Estate Commission, 548 F.Supp. 566 (N.D.Tex.1982). The district court also held that the parties had “settled any question of abstention” by stipulating that they waived their rights to demand abstention. Id. at 570.
II.
While we are impressed by the parties’ maneuvers to get an initial ruling on the first amendment question from a federal court, we cannot overlook the serious and repeated procedural transgressions that have taken place in the course of this action. Arguably, the claim advanced in this second federal action is precluded by the first federal judgment. Certainly, the initial review of the constitutionality of a state agency’s interpretation of its own rules is a matter that the federal courts should undertake only when circumstances warrant it and abstention would serve no purpose. The instant case presents a paradigm of a situation in which the correct action for the federal courts is to abstain. In short, we should not entertain this case.
Res Judicata
Res judicata is a judicially-created doctrine designed to avoid repeated litigation of the same claims by the same parties. “True” res judicata, or “claim preclusion,” as aptly defined by Judge Rubin of our court,
treats a judgment once rendered, as the full measure of relief to be accorded between the same parties on the same “claim” or “cause of action.” . .. When the plaintiff obtains a judgment in his favor, his claim “merges” in the judgment; he may seek no further relief on that claim in a separate action. Conversely, when a judgment is rendered for a defendant, the plaintiff’s claim is extinguished; the judgment then acts as a “bar”.... Under these rules of claim preclusion, the effect of a judgment extends to the litigation of all issues relevant to the same claim between the same parties, whether or not raised at trial.6
In its earlier action, UHR asserted that the statute was unconstitutional as applied on both first amendment and equal protection grounds. The record indicates that the UHR I court refused to decide the first amendment question. Nonetheless, if on these facts UHR’s first amendment and equal protection arguments are part of the same “claim” for res judicata purposes, the judgment of the district court in UHR I may bar UHR from subsequently attacking the statute on either theory.
The definition of a claim or cause of action for res judicata purposes in the federal system, where joinder of claims is not mandatory,7 has been much debated.8 This Circuit has definitively established as the standard to be applied in determining whether the substance of the two actions is the same for res judicata purposes the transactional test of a “claim” enunciated in the Second Restatement of Judgments. Nilsen v. City of Moss Point, 701 F.2d 556, 559-60 & n. 4 (5th Cir.1983) (en banc).9 The [329]*329transaction involved here is the Commission’s demand that all UHR employees “that communicate with the public” be licensed 10 and UHR’s contention that the federal Constitution bars the Commission from interpreting the statute in this fashion. Applying this test, it appears that the “cause of action” sought to be asserted by UHR in this action is the same as that decided adversely to UHR in UHR I.11 Cf. Jones v. Texas Tech Univ., 656 F.2d 1137 (5th Cir.1981) (affirming district court dismissal of second suit as barred by res judicata where plaintiff denied permission to demonstrate without restriction alleged first amendment and due process violations in first suit, consent judgment was entered, and plaintiff subsequently asserted due process claim based on University’s conduct of disciplinary proceedings); Southern Jam, Inc. v. Robinson, 675 F.2d 94 (5th Cir.1982) (affirming district court dismissal on res judicata grounds where plaintiff challenged regulation preventing it from holding concert on federal equal protection and due process grounds in state court, received ad[330]*330verse judgment, and subsequently filed first amendment claim in federal court) (applying Georgia law).
As we stated in Nilson:
That the issue presented here was never decided in the former case does not signify; according to general theories of judicial estoppel, to which “federal courts have traditionally adhered,” it is black-letter law that res judicata, by contrast to narrower doctrines of issue preclusion, bars all claims that were or could have been advanced in support of the cause of action on the occasion of its former adjudication, Allen v. McCurry, 449 U.S. 90, 94, 101 S.Ct. 411, 414, 66 L.Ed.2d 308 (1980) [issue preclusion by state judgment in § 1983 action, dicta that claim preclusion doctrine equally applicable], not merely those that were adjudicated. And it is equally settled that one who has a choice of more than one remedy for a given wrong . . . may not assert them serially, in successive actions, but must advance all at once on pain of bar.
701 F.2d at 560.
Despite our conviction that these plaintiffs have had two bites at the apple, we are reluctant to dispose of this appeal on res judicata grounds. First, res judicata is an affirmative defense, and the Commission has not raised it either at trial or before us. Rather, both parties have treated UHR I simply as precedent, using it for the proposition that the statutes in question as applied to rental information agencies have survived a rational relationship test. This failure to assert res judicata as a defense does not determine the issue, however, since in the interest of judicial economy res judicata may properly be raised by a district court sua sponte, particularly where both actions are brought in the courts of the same district. See Boone v. Kurtz, 617 F.2d 435, 436 (5th Cir.1980) (affirming district court sua sponte dismissal on res judicata grounds); Willis v. Fournier, 418 F.Supp. 265, (D.C.Ga.), aff’d 537 F.2d 1142 (5th Cir. 1976); Hicks v. Holland, 235 F.2d 183 (6th Cir.), cert. denied, 352 U.S. 855, 77 S.Ct. 83, 1 L.Ed.2d 66 (1966) (same). On occasion, appellate courts have raised the issue for the first time on appeal. See Robertson v. Interstate Securities Co., 435 F.2d 784, 787 n. 4 (8th Cir.1971); Wilson v. United States, 166 F.2d 527, 529 (8th Cir.1948). In these cases, however, the appellate court considered applying res judicata as a means to affirm the district court decision below.
On these facts, we decline to take the drastic step of invoking res judicata for the first time on appeal and reversing the district court below as a consequence. What scanty evidence of the prior action appears on this record indicates that, far from having a full and fair opportunity to litigate the first amendment issue in the prior action,12 plaintiffs were expressly denied that opportunity by the district court.13 While the proper course for UHR’s counsel would have been to appeal the refusal of the district court to hear his first amendment claim, rather than to refile, it appears unduly harsh to preclude UHR from having its first amendment argument heard because of this procedural error. See Howell v. State Bar of Texas, 674 F.2d 1027 (5th Cir.1982), vacated and remanded on other grounds,-U.S.-, 103 S.Ct. 1515, 75 L.Ed.2d 942 (1983) (where plaintiff withheld [331]*331his federal constitutional arguments from the state courts after the federal district court erroneously relegated him to the state system with a promise that he could return with his federal claims, plaintiff did not have a full and fair opportunity to litigate those claims and would not be barred by res judicata.)
We must also consider whether the prior federal judgment has any collateral estoppel effects in this action. Collateral estoppel, or issue preclusion, bars relitigation of issues actually litigated and necessarily adjudicated in a prior proceeding between the same parties. Here, the district court in UHR I ruled: 1) that the statute did require plaintiff’s employees performing the activities in question to be licensed, and 2) that this interpretation of the licensing requirement bore a rational relationship to a legitimate state end of consumer protection. Thus, in this second suit, the affirmative defense of collateral estoppel, if asserted, would bar the plaintiffs from relitigating either 1) that the statute did not require licensure of their clerical-type employees, or 2) that such a requirement violated their due process rights. Neither the parties nor the court below, however, raised any estoppel issue. Rather, the court below implicitly redetermined, de novo, the question of the statute’s applicability in ruling that as applied to UHR’s clerical-type employees the statute violated UHR’s first amendment rights of commercial speech.
The parties to this litigation and the court below have consistently treated the prior litigation as of no more than precedential effect. We see no occasion to declare on our own motion that the prior judgment has more than precedential value. Accordingly we decline to ourselves raise and apply collateral estoppel to the court’s findings in UHR I.
Abstention
The landmark case of Railroad Commission of Texas v. Pullman Co., 312 U.S. 496, 61 S.Ct. 643, 85 L.Ed. 971 (1941), established the principle that “a federal court may, and ordinarily should, refrain from deciding a case in which state action is challenged in federal court as contrary to the federal constitution if there are unsettled questions of state law that may be dispositive of the case and avoid the need for deciding the constitutional question.”14 While the doctrine of abstention has developed extensively over the years since Pullman,15 Pullman abstention remains the best-settled of the abstention variants.
One type of case almost universally recognized as appropriate for abstention is that of a state statute, not yet construed by the state courts, which is susceptible of one construction that would render it free from federal constitutional objection and another that would not. A federal [332]*332court should not place itself in the position of holding the statute unconstitutional by giving it the latter construction, only to find that the highest court of the state will render the decision futile and unnecessary by adopting the former. Such a decision not only is a waste of judicial resources but provokes a needless collision between state and federal power.
Friendly, Federal Jurisdiction: A General View, 93 (1973).16
The facts of this case fall squarely within the well-defined ambit of Pullman abstention. “In the bulk of abstention cases in this Court, the unsettled issue of state law principally concerned the applicability of the challenged statute to a certain person or a defined course of conduct, whose resolution in a particular manner would eliminate the constitutional issue and terminate the litigation.” Baggett v. Bullitt, 377 U.S. 360, 376-78, 84 S.Ct. 1316, 1325-26, 12 L.Ed.2d 377 (1964) (citations omitted), see cases cited id., n. 12. Here, UHR asserts that the Commission’s interpretation of the statute, which would require licensure of UHR employees engaged in clerical tasks, is unconstitutional. As with any constitutional challenge to a statute “as applied,” this claim involves two questions: 1) Is the Commission’s interpretation of the statute correct? 2) Does that interpretation violate the federal constitution?
The former is a question of state law which, as far as this record indicates, has not been reviewed by the state courts. It is, moreover, a question dispositive of the constitutional questions: if a state agency or court were to find that the Commission had erred in concluding that UHR’s clerical employees had to be licensed, the constitutional issues hotly contested here would obviously be moot. The outcome of the administrative proceedings now pending against Messrs. Livingston and Bushman— or a state court appeal from those proceedings — could moot or significantly modify the constitutional question before us.17
In the proceedings below, the parties attempted to preclude abstention and force a resolution of the constitutional issue in the federal courts by stipulating that they waived “their right to assert or demand abstention by the Court.” UHR I, supra, at 570. The district court concluded that this stipulation “settled any questions of abstention.” Id. This was error. Because the abstention doctrine is designed to balance the interests of the federal and state judicial systems and to avoid unnecessary adjudication of constitutional issues, a federal court should decide for itself whether to abstain on its own motion in Pullman-type cases, regardless of the wishes of the parties.18 Accordingly, we now consider the propriety of abstention19 on the facts of this case.20
[333]*333Initially, we note that the ambiguity of state law necessary to Pullman abstention exists here. We do not agree with the parties that the Real Estate License Act and the regulations promulgated thereunder clearly require licensing of UHR employees performing clerical tasks.21
The rules specifically authorize a real estate broker to employ unlicensed clerical employees and to have an answering service which gives out information as to properties available.22 Arguably, UHR’s employees who answer the telephone do no more than the clerical or secretarial employees of any broker who also “communicate with the public” by answering the phone.
The other rules which the state attempts to apply to UHR employees are similarly ambiguous. For example, the rules state that the compilation and sale of rental information is “an activity requiring licensure,” 23 but this language does not preclude the reasonable interpretation that while this activity must be done in the office of a licensed broker fully accountable for the acts of his employees, not every physical act involved in the compilation need be performed by a licensed broker.24 Again, the rules require licensure of rental agents engaging in “solicitation” — “unless such agents are employees of the owner of the property concerned.”25 This rule apparently refers to “solicitation” on behalf of property owners — i.e. solicitation of prospective tenants — not the gathering of information about other rental properties. The record indicates that UHR does not solicit tenants for a particular landlord, but rather subscribers to its information service. We express no opinion on how the rules ought to be interpreted;26 we seek only to show that, taken together, the rules are susceptible of a construction which would moot or significantly modify the constitutional issue.27
We cannot rule out the strong possibility that the state agency or the state courts will interpret the regulations at issue so as to obviate any potential first amendment violation.28
[334]*334In reaching the decision that abstention is necessitated by the facts of this case, we have taken into account the disadvantages usually considered consequent to abstention: “piecemeal results and delay.” Ross v. Houston Independent School Dist., 559 F.2d 937, 942 (5th Cir.1977). A review of the facts of this case, however, reveals that those very problems would be exacerbated by our entertaining the claims presented here. The record reveals that before bringing this quarrel to federal court as a constitutional matter, the parties were engaged in a process of negotiation and compromise as to the scope of the licensing requirement.29 This action has halted not only that process but state proceedings in which the parties could have arrived at a mutually satisfactory interpretation of the licensing requirements. For a federal court to adjudicate this controversy as a constitutional matter at this stage would indicate to other parties engaged in similar discussions with state agencies — and to the agencies themselves — that the federal courts will provide a ready solution to local disputes over state regulations.
If [such state proceedings] are stayed, whether by stipulation or otherwise, while these issues are litigated over the course of several years through the tiers of the federal system, the possibilities of delay and piecemeal resolution are interminably expanded. Such an encroachment of the federal government into ongoing state proceedings would be unseasonable and obtrusive. The “delay and expense to which application of the abstention doctrine inevitably give rise,” Bellotti v. Baird, 1976, 428 U.S. 132, 150, 96 S.Ct. 2857, 2868, 49 L.Ed.2d 844, quoting England v. Medical Examiners, 1964, 375 U.S. 411, 418, 84 S.Ct. 461, 466, 11 L.Ed.2d 440, 446, would be even more acute if we did not abstain here.
Gibson v. Jackson, 578 F.2d at 1050-51.
Pullman mandates that a federal court faced with an initial review of a state agency’s application of its own regulations, where that application is challenged on constitutional grounds, should abstain, absent compelling circumstances, in order to allow the state agency and the state courts first review of the interpretation of state law at issue and to avoid unnecessary constitutional adjudication.
The facts of this case require abstention under Pullman. On remand, the district court should dismiss this action without prejudice.30
The judgment below is
REVERSED AND REMANDED FOR PROCEEDINGS CONSISTENT WITH THIS OPINION.