
37 S.W.3d 538 (2001)
MOTOR VEHICLE BOARD OF the TEXAS DEPARTMENT OF TRANSPORTATION, Appellant,
v.
EL PASO INDEPENDENT AUTOMOBILE DEALERS ASSOCIATION, INC., Appellee.
No. 08-98-00022-CV.
Court of Appeals of Texas, El Paso.
February 8, 2001.
Rehearing Overruled March 7, 2001.
*539 John Cornyn, Attorney General, Linda Booth Secord, Assistant Attorney General, Natural Resources Division, Douglas Burt Fraser, Assistant Attorney General, Austin, for appellant.
Corey Haugland, James, Goldman & Haugland, P.C., Laura P. Gordon, Assistant City Attorney, El Paso, for appellee.
Before Panel No. 3 BARAJAS, C.J., LARSEN, and CHEW, JJ.

OPINION
LARSEN, Justice.
This appeal involves a constitutional challenge to the last remaining "blue law" in Texas, which prohibits the sale of motor vehicles on consecutive Saturdays and Sundays.[1] Finding that a party necessary for just adjudication was not included in the suit, we vacate the trial court's judgment and dismiss the cause for lack of jurisdiction.

FACTS
The El Paso Independent Automobile Dealers Association (the association) filed suit against the El Paso district, county, and city attorneys (the local officials), seeking a declaration that Texas Transportation Code Sections 728.001 through 728.004 (the blue law) are unconstitutional, and requesting that the court enjoin enforcement of those statutes. Although the association did not sue the Texas Attorney General nor any of its client agencies, it served notice of the suit on the Texas Attorney General, as is required when challenging the constitutionality of a state statute.[2] By letter to the association's attorney, the attorney general declined to participate in the case, stating "[e]ven though the constitutionality of a state statute is involved in this cause, the Attorney General believes that the real parties in interest can adequately present the issues to the court."
The local officials filed a general denial, but ultimately concluded that the blue law is, in fact, unconstitutional. They tailored their negotiations accordingly, and after a brief evidentiary hearing, the trial court entered judgment with agreed findings of fact and conclusions of law consistent with the statute's unconstitutionality. The judgment provides:
1. TEX. TRANS. CODE §§ 728.001 through 728.004 are hereby declared unconstitutional;
2. All officials authorized by TEX. TRANS. CODE § 728.004 to enforce TEX. TRANS. CODE §§ 728.001 through 728.004 are hereby permanently enjoined from enforcing the provisions of TEX. TRANS. CODE §§ 728.001 through 728.004 unless the Texas Supreme Court shall subsequently rule that the statutes are constitutional.
*540 The attorney general and its client agency, the Motor Vehicle Board of the Texas Department of Transportation (the board) learned of this judgment and belatedly took an interest in this suit: they filed post-judgment motions to intervene, a motion for new trial, and a notice of appeal. The local officials, apparently as an accommodation to preserve whatever rights the board and attorney general might have, filed a notice of appeal. This court initially held that the attorney general and board had the right to appeal under the doctrine of virtual representation, but concluded that they had waived that right as evidenced by their letter declining to participate in the case.[3] The Texas Supreme Court reversed, holding that, because the board and attorney general believed the local officials would defend the constitutionality of the blue law, they had not expressly renounced a known right, and therefore had not forfeited their right to appeal.[4] The Supreme Court remanded to this court for review of the merits of the board's appeal, which we now undertake.
Before reaching the merits of the board's issues on appeal, we feel constrained to note that the attorney general's affirmative refusal to participate in this case placed the trial court in an impossible position, and nothing in our opinion should be interpreted as a criticism of the trial court's actions. The plaintiff, local officials, and trial court relied upon the attorney general's voiced intention that it would not participate in the suit; the parties and court then adjudicated the question at issue. That the local officials concluded the statute was unconstitutional, and decided not to waste the taxpayers funds defending it, was certainly within their discretion. No one complained that a necessary party had been left out of the suit. Frankly, we cannot find fault with the actions of any party to this lawsuit except the attorney general's delay in deciding it should protect the interests of its client. It is with chagrin that we determine it must prevail on this appeal. Nevertheless, for the reasons set out below, and in only this narrow and unique situation, we must conclude that the board was a necessary party and that the judgment entered must be vacated.

Necessary party
In its first issue on appeal, the board contends that it was a necessary party to this suit, without whom the trial court lacked jurisdiction to proceed, and therefore this court should dismiss the case. Upon examination of the facts, we must reluctantly agree. The rule governing this contention is TEX.R. CIV. P. 39, which provides that a person who is subject to service of process shall be joined as a party in the action if "in his absence complete relief cannot be accorded among those already parties...."[5] In examining this issue, we begin from the Supreme Court's admonishment that:
Under the provisions of our present Rule 39 it would be rare indeed if there were a person whose presence was so indispensable in the sense that his absence deprives the court of jurisdiction to adjudicate between the parties already joined.[6]
Nevertheless, there are rare cases in which failure to name an indispensable party will deprive a court of jurisdiction,[7]*541 and such an instance is where a party responsible for enforcing a statute is not named in an action to declare that statute unconstitutional. A case closely analogous to the one before us is Lone Starr Multi Theatres, Inc. v. State,[8] in which the Austin court of appeals held that a trial court had no jurisdiction to declare an obscenity statute unconstitutional because the plaintiff had sued only the State of Texas and the attorney general, while enforcement of obscenity statutes was constitutionally vested in district and county attorneys.[9] The Austin court held that a party who is responsible for enforcement of an allegedly unconstitutional statute must be a defendant against whom suit for declaratory or injunctive relief is sought, and that the trial court had correctly dismissed the case for lack of jurisdiction.[10]
Here, the association named the city, county, and district attorneys as defendants in its declaratory judgment action, and those entities are indeed empowered by statute to enforce the blue law, as is the attorney general.[11] At the hearing on this matter, however, the only evidence of enforcement efforts were complaints filed by appellant Motor Vehicle Division-Enforcement Section[12] against various members of the association. Nowhere is there any indication that the city, county, or district attorneys acted to enforce the blue law against any of plaintiff's members. The board is clearly empowered to enforce the blue law concerning sale of motor vehicles:
The board has the general and original power and jurisdiction to regulate all aspects of the distribution, sale, and leasing of motor vehicles....[13]
Moreover, the association was on notice that the board had such power, as its members had been fined on more than one occasion as a result of the board's enforcement actions. Thus, we conclude it was a party responsible for enforcement of the blue law, and should have been joined in the suit.
Moreover, after filing their general denial, the local officials did not attempt to defend the blue law's constitutionality (albeit this court does not question their good faith in deciding to proceed as they did). In a declaratory judgment action, there must exist between the parties a justiciable controversy to be determined by the judgment.[14] Although in most cases, the agreement of the parties is sufficient basis for the court to render judgment, this is not always so.[15] In some circumstances, even where the parties before the court agree, judgment must result only after hearing.[16] A declaration that the blue law is unconstitutional may be entirely justified, but it is our conclusion that, particularly in light of the non-adversarial nature of the hearing on the merits here, where the only entity enforcing the law was not a named party, the trial court did not have jurisdiction to make that declaration.
*542 We therefore hold the trial court lacked jurisdiction because a party responsible for enforcing the blue lawindeed the only party actually enforcing it against the plaintiffwas not named in the action to declare the statute unconstitutional.

CONCLUSION
The Motor Vehicle Board's first issue on appeal is sustained. The trial court's judgment is vacated and the cause is dismissed for lack of jurisdiction.[17]
NOTES
[1]  TEX. TRANS. CODE ANN. § 728.002 (Vernon 1999).
[2]  TEX. CIV. PRAC. & REM.CODE ANN. § 37.006(b) (Vernon 1997).
[3]  Attorney General of Texas v. El Paso Independent Automobile Dealers Assoc., Inc., 966 S.W.2d 783, 785-86 (Tex.App.-El Paso 1998).
[4]  Motor Vehicle Board of the Texas Department of Transportation v. El Paso Independent Automobile Dealers Assoc., Inc., 1 S.W.3d 108, 112 (Tex.1999).
[5]  TEX.R. CIV. P. 39(a).
[6]  Pirtle v. Gregory, 629 S.W.2d 919, 920 (Tex. 1982) (quoting Cooper v. Texas Gulf Industries, Inc., 513 S.W.2d 200 (Tex.1974)).
[7]  Lone Starr Multi Theatres, Inc. v. State, 922 S.W.2d 295, 297 (Tex.App.-Austin 1996, no writ).
[8]  Id.
[9]  Id. at 298.
[10]  Id.
[11]  TEX. TRANS. CODE ANN. § 728.004(a) (Vernon 1999).
[12]  Adding more confusion to an already confused case, appellant has been alternatively designated as the Motor Vehicle Board and the Motor Vehicle Division. Nevertheless, the Supreme Court has held that "[a]lthough the Board and the Motor Vehicle Division are not technically the same, their interests are virtually identical under the Motor Vehicle Commission Code." Motor Vehicle Board of Texas Department of Transportation, 1 S.W.3d at 112. As it appears, the Supreme Court has treated the two as interchangeable, under the law of the case doctrine, we will do likewise. See City of Dallas v. Cornerstone Bank, 879 S.W.2d 264, 268 (Tex.App.-Dallas 1994, no writ).
[13]  TEX.REV.CIV. STAT. ANN. art. 4413(36), § 3.01(a) (Vernon Supp.2001).
[14]  Lone Starr Multi Theatres, 922 S.W.2d at 298.
[15]  Terrazas v. Ramirez, 829 S.W.2d 712, 719 (Tex.1991).
[16]  Id.
[17]  A dismissal for nonjoinder of a necessary party is without prejudice. See Blythe v. City of Graham, 303 S.W.2d 881, 883 (Tex.Civ. App.-Fort Worth 1957, no writ).
