
350 So.2d 405 (1977)
The ALABAMA YOUTH SERVICES BOARD, a Public Board, et al.
v.
Robert L. (Bob) ELLIS et al.
SC 2161.
Supreme Court of Alabama.
September 30, 1977.
Rehearing Denied December 2, 1977.
*406 Truman Hobbs, Robert D. Segall and Claud W. Lavender, Jr., Montgomery, for appellants.
John P. Carlton, Ronald L. Stichweh, Charles E. Clark and Lee B. Lloyd, Birmingham, for appellees.
BEATTY, Justice.
This is an appeal from an order of the Jefferson County Circuit Court enjoining the Alabama Youth Services Board from closing the Alabama Boys Industrial School (ABIS); from diminishing its level of services; requiring the Board to include a specific curriculum; requiring a certain level of funding; and requiring the Board to convey the ABIS land to The First National Bank of Birmingham, as Trustee. We reverse and remand.
The plaintiffs, various public officials of Jefferson County and the City of Birmingham, a number of private citizens, together with the legal guardian of a student at ABIS, filed this action on September 23, 1976 in the Circuit Court of Jefferson County seeking declaratory and injunctive relief. Specifically, their complaint alleged that the services and funds available to ABIS had been substantially reduced, and that this facility would ultimately be closed, all in contravention of Tit. 55, § 289 et seq. The plaintiffs sought an interpretation of Act No. 816, Regular Session, 1973 Legislature, and a mandatory injunction providing for maintenance of ABIS at its present location and its services at the level of the time of Act No. 816's passage, and for the conveyance mentioned above.
Named as defendants were the Alabama Youth Services Board, the members of that Board, ABIS, a public corporation, and The First National Bank of Birmingham, as Trustee. The Board moved to dismiss the complaint for lack of jurisdiction and venue. This motion was denied. The merits were considered at a hearing on October 11, 1976, and a final decree entered on October 13, 1976. The relief sought was therein provided. A motion filed by the Board to vacate the decree on grounds of lack of venue and of evidence was denied. This appeal ensued, pending the outcome of which this Court has granted a stay of the trial court's decree.
The first issue presented by the defendant-appellants concerns the venue of the action. Because the Alabama Youth Services Board and its board members are named defendants, should the action have been filed in Montgomery County rather *407 than in Jefferson County? If so, the trial court committed reversible error in failing to transfer the case. City Stores Company v. Williams, 287 Ala. 385, 252 So.2d 45 (1971).
There is a considerable body of law in this state, as there is elsewhere, requiring an action against a state agency or a state official in his official capacity to be brought in the county of official residence. A statement of the general rule appears in 92 C.J.S. Venue § 115, p. 817:
A governmental body is generally regarded as having its residence for purposes of venue in the county where its principal place of business is located, or in the place where its domicile is fixed by law. . . .
The question was not directly at issue in First Nat. Bank of Linden v. Alston, 231 Ala. 348, 165 So. 241 (1936), a suit to effect a change in ownership of a bond. However, the state treasurer was a material respondent, and the necessity for filing the suit in Montgomery County was accepted by this Court against several other objections. But in Kelley v. Lingo, 280 Ala. 128, 190 So.2d 683 (1966), the question was directly in issue. This Court held that a person seeking a remedy from the Director of Public Safety for a revocation of his driver's license because of a driving-while-intoxicated conviction, must file his action in Montgomery County, "the official residence of the Director of Public Safety of the State of Alabama." And in Tri-State Corporation v. State ex rel. Gallion, 272 Ala. 41, 128 So.2d 505 (1961), because the governor of the state and the director of the State Department of Conservation were necessary parties, venue in Montgomery County, the county of their official residences, was upheld. The same result attended in ABC Board v. Owen, 54 Ala.App. 419, 309 So.2d 459 (1975) where the action was one to review the action of the Alabama Alcoholic Beverage Control Board in suspending a beer license. The Court of Civil Appeals held that the trial court had erred in failing to transfer the case from Madison County to Montgomery County.
A significant case on this issue arose when the Circuit Court of Madison County issued a writ of prohibition against the Alabama State Bar and its officials from further prosecution of disciplinary proceedings against a deputy district attorney of the Twenty-Third Judicial Circuit. There was a difference of opinion in this Court on whether there was a jurisdictional or a venue problem presented by the order of the Madison County Circuit Court. The majority opted for the former view, holding that the decision of Ex parte Alabama Textile Products Corp., 242 Ala. 609, 7 So.2d 303 (1942), controlled:
. . . [w]here a board or commission of state-wide jurisdiction has its principal place of business in Montgomery, the Circuit Court of Montgomery County is the only court which would have authority to issue a supervisory writ. [Alabama State Bar v. Watson, 289 Ala. 729, 732, 272 So.2d 240, 242 (1972)].
The minority, on the other hand, considered the issue one not of jurisdiction but of venue which properly was in Montgomery County but which had been waived by a failure to object. Watson, supra at 735, 272 So.2d 240. Whichever view was correct, this Court as a whole recognized that the proper forum was located in Montgomery County.
Contrary to the plaintiffs' contentions, nothing is contained in either Ex parte Dothan-Houston County Airport Authority, 282 Ala. 316, 211 So.2d 451 (1968) or Boswell v. Citronelle-Mobile Gathering, Inc., 292 Ala. 344, 294 So.2d 428 (1974) which modifies this legal stance. Ex parte Dothan simply held that venue was waived by the filing of a general appearance. While recognizing that venue in a suit against a state official ordinarily would be laid in Montgomery County, his official residence, the Citronelle case held that the general rule did not apply because the particular legislative act in question, in creating the remedy, also gave the aggrieved party the right to sue in his, the aggrieved party's, residence. In that connection, we take judicial notice of terms of the statute creating the Department of Youth Services:

*408 . . . The principal offices of the department shall be located at the state capital. . . . [Tit. 55, § 289(13); Acts of 1973, No. 816, § 3, appvd. September 5, 1973];
and the Youth Services Board:
. . . The principal offices of the board shall be located at the state capital.. . . [Tit. 55, § 289(14); Acts of 1973, No. 816, § 4, appvd. Sept. 5, 1973].
The plaintiffs, on the other hand, have cited us to Rule 82(c), ARCP and Tit. 7, § 294, Alabama Code, as laying venue in Jefferson County. Rule 82(c) provides:
Where several claims or parties have been joined, the suit may be brought in any county in which any one of the claims could properly have been brought. Whenever an action has been commenced in a proper county, additional claims and parties may be joined, pursuant to Rules 13, 14, 22 and 24, as ancillary thereto, without regard to whether that county would be a proper venue for an independent action on such claims or against such parties.
Because one of the plaintiffs' claims concerns real estate located in Jefferson County, it is maintained, this suit is properly in Jefferson County. Title 7, § 294 provides:
The bill must be filed in the county in which the defendant, or a material defendant, resides; and if to enjoin proceedings on judgments in other courts, it may be filed in the county in which such proceedings are pending, or judgment rendered; and in case of non-residents, in the county where the subject of the suit or any portion of the same, is when the cause of action arose, or the act on which the suit is founded was to be performed; or if real estate be the subject-matter of the suit, whether it be the exclusive subject-matter of the suit or not, then in the county where the same, or a material portion thereof is situated.
The concern for real estate arises from the prayer that the land, whose title is held by the Alabama Boys Industrial School, be conveyed to The First National Bank of Birmingham, as trustee. Such an allegation does not make this real estate the "subject matter" of this suit, however. "Subject matter" under Section 294 refers to the nature of the cause of action and of the relief sought. The allegation that one of the parties owns real estate, or has substantial rights in real estate which are dependent upon the settlement of the controversy, is not enough to make real estate the "subject matter" of the suit. Clark v. Sanders, 267 Ala. 674, 103 So.2d 370 (1958). The nature of this action and of the relief sought was a declaratory judgment, seeking a judicial construction of Act No. 816, which is Tit. 55, Chap. 7A, §§ 289(11)-(47), and for a court order establishing a financial floor on the operation of the Alabama Boys Industrial School because of an alleged statutory mandate. Moreover, the allegations in this case pertaining to the location of real estate in Jefferson County, while they may resolve a venue question in an ordinary case, do not control a case such as this where the action is one against a state agency. Tri-State Corporation v. State, supra, for example, was a case concerning real estate located in a county other than Montgomery County. On the issue of venue, however, this Court held that Montgomery County furnished the proper forum because the material defendants had their official residences in that county.
Plaintiffs insist that Jefferson County holds the proper venue because the Alabama Boys Industrial School itself is a material defendant. In that connection, the trial court, in its order, found that the school was a public corporate entity, was duly represented at the trial, and participated in it.
Is ABIS a material defendant? Such a defendant is one whose position is antagonistic to that of the plaintiffs because relief is sought against him. Wilder v. Crook, 250 Ala. 424, 34 So.2d 382 (1948). There is nothing alleged in this complaint which is antagonistic to the interest of ABIS; indeed, the contrary is true. The gist of the entire suit is to sustain the operation of ABIS against a reduction of its financial resources by the Alabama Youth *409 Services Board. Therefore the School could not be a material defendant.
The trial court also found that ABIS retained its independent corporate identity. We suppose that this finding was made to comport with the requirements of Tit. 7, § 294 as applied to a corporate domicile. If ABIS is in fact a "public corporate entity," the record fails to disclose any service of process upon it or any appearance by it in these proceedings. The record discloses that Mr. Lavender, the attorney for the Alabama Youth Services Board, made it clear to the court that he did not represent ABIS:
CHARLES CLARK:
Mr. Lavender represents every other named Defendant and appears for them.
CLAUDE LAVENDER:
With the exception of Alabama Boys Industrial School which, in my opinion, is not a corporate entity, no longer a corporation.
COURT:
In what status do you appear in the Court?
MR. LAVENDER:
As representative of the Alabama Youth Services Board.
The motion to dismiss filed by him represents him as "ATTORNEY FOR YOUTH SERVICES BOARD, and its members." The answer he filed contains the same recital.
Accordingly, the trial court could not have proceeded against that "public corporate entity" without extending to it the right of process and an opportunity to respond.
Finally, it is clear that The First National Bank of Birmingham was not a material defendant, but was joined in this action only as a "proper" party. No relief was sought from that Bank, and the trial court's order granted none against that Bank. At most the Bank was only a proper party as a corporate trustee. Such a party cannot control venue where, as here, it has no interest in the principal matter in controversy. First National Bank of Birmingham v. Johnson, 227 Ala. 40, 148 So. 745 (1933).
Because we have found that the venue of this action lies in Montgomery County instead of Jefferson County, it was reversible error for the trial court to overrule the defendant Alabama Youth Services Board's motion to dismiss and motion to vacate judgment which were brought in timely fashion to the trial court's attention. The judgment is reversed and the cause remanded to the trial court with direction to enter an order not inconsistent with this opinion.
REVERSED AND REMANDED.
TORBERT, C. J., and MADDOX, FAULKNER and SHORES, JJ., concur.
