
460 So.2d 1258 (1984)
FIRST BAPTIST CHURCH OF GRAYSON VALLEY, INC.
v.
NATIONWIDE BOND, INC., and Insurance Company of North America, as corporations, and R. Frank Ussery, Director, Alabama Securities Commission, as an individual.
No. 83-895.
Supreme Court of Alabama.
September 28, 1984.
Rehearing Denied November 30, 1984.
*1259 Herbert W. Stone, Birmingham, for appellant.
Gould H.K. Blair, Birmingham, for appellee Nationwide Bond, Inc.
William C. Wood of Norman, Fitzpatrick & Wood, Birmingham, for appellee Ins. Co. of North America.
BEATTY, Justice.
Plaintiff church appeals from an adverse judgment in its declaratory judgment action against Nationwide Bond, Inc. (Nationwide), Insurance Company of North America (INA), and R. Frank Ussery, Director, Alabama Securities Commission, individually.[1] The action sought recovery under Code of 1975, § 8-6-3(c), on the theory that that code section afforded a remedy to the public in general against a surety for the fraudulent sale of securities, whether or not the liability of the surety was conditioned by the terms of the surety's bond. The trial court denied the relief sought. We affirm.
This is the third proceeding arising out of the operative facts. In the first proceeding, filed in 1980, the plaintiff sued one Samuel B. Shell and Nationwide for damages, alleging that Shell had made fraudulent representations in connection with the issuance and sale of church bonds. INA was not made a party to those proceedings. That case was tried to a jury, which returned a verdict against Shell alone. The verdict, in fact, expressly exonerated Nationwide; in any case, no appeal was taken from the judgment entered on that verdict, which was entered February 11, 1982.
Later, on April 21, 1982, plaintiff sued Nationwide and INA on what the church described as a "motion to enforce liability of surety." This action sought to compel the defendants to pay $10,000.00 under the bond required by Code of 1975, § 8-6-3(c). That statute states, in pertinent part:
"(c) Before any dealer registration shall be effective under this article, such dealer shall enter into a bond of not less than $10,000.00, which said bond shall be payable to the state of Alabama, shall be executed by the dealer and a corporation qualified to do business as a surety company in the state of Alabama and shall be filed with the securities commission. Said bond shall be in such form as the commission shall from time to time designate and shall be conditioned upon the faithful accounting of all moneys and securities of another and for the payment of any judgment entered by a court of competent jurisdiction against such dealer or agent of such dealer, one or both, in any civil action in Alabama based upon fraud or misrepresentation in the sale in Alabama of any security. Any original purchaser of securities from or through any such registered dealer or other person damaged by any breach in the conditions of said bond shall have a right of action upon said bond for the damages suffered thereby. No action may be maintained to enforce any liability under the bond unless brought within two years after the sale or other action upon which such action is based."
It was disclosed in that second action that INA was the surety on the statutory security dealer's bond, with Nationwide, a registered securities dealer, as the principal. The condition of that bond was:

*1260 "[If] said principal ... shall promptly and faithfully pay any judgment rendered against it ... for any fraud or misrepresentation in the sale of securities sold or dealt in by said principal under the above-mentioned registration... then this obligation shall be null and void...." First Baptist Church of Grayson Valley, Inc. v. Shell, 439 So.2d 29 (Ala.1983).
The trial court in that case prepared a statement of the proceedings as follows:
`"Does Section 8-6-3(c) of Code of Alabama 1975, make the Insurance Company of North America, and/or Nationwide Bond, Inc. liable to the plaintiff under the provisions and conditions of their bond (Exhibit 1 of plaintiff-appellant's "Motion to Enforce Liability of Surety") though the jury has found as a question and matter of fact, that the defendant, Samuel B. Shell, was not acting in the line and scope of his employment or agency for either Nationwide Bond, Inc., nor Insurance Company of North America, at the time and place of the events made the basis of the suit, Case No. CV 80 01782?'" 439 So.2d at 30.
The trial court decided that issue against this plaintiff and it appealed. See First Baptist Church of Grayson Valley v. Shell, 439 So.2d 29 (Ala.1983). This Court held in that case that: "Insurance Company of North America is only liable for payment of any judgment that Nationwide should fail to pay. There is no judgment against Nationwide."
This Court also dismissed that appeal for reasons not relevant here.
Plaintiff then brought this third proceeding on January 11, 1984, suing Nationwide for the third time and INA for the second time, asking for a declaration that § 8-6-3(c) is to be interpreted to insure a recovery, represented by the amount of the bond, against a security dealer whose agent has committed fraud.
The trial court in this third lawsuit held this:
"Whatever liability Shell had to the Plaintiff Church, it has been adjudicated in the action and appeal captioned First Baptist Church of Grayson Valley, Inc. v. Samuel B. Shell, Nationwide Bond, Inc. and Insurance Company of North America.... That action, after trial by jury in the trial court, resulted in a verdict and judgment against Shell alone and in favor of Nationwide on February 11, 1982. The issue of whether Shell was an agent of Nationwide in the events here has been finally adjudicated against the Church. The liability of Insurance Company of North America to the Church has been likewise adjudicated."
The trial court then granted defendants' motion to dismiss. It appears that in considering the motion the trial court considered matters outside the pleadings. Thus, the motion was considered as one for summary judgment. Rule 12(b), A.R.Civ.P. In any case, no objection was made with respect to the procedure utilized by the trial court in making its ruling. Chestnut Hills Civic Association, Inc. v. Dobbins, 361 So.2d 1043 (Ala.1978).
Plaintiff cannot prevail in this appeal for either of two reasons. For one, the doctrine of res judicata bars its recovery in this lawsuit. The thrust of plaintiff's present action, confirmed by the allegations of its claim under § 8-6-3(c) is that Shell was the "agent" of Nationwide in the sale of the bonds in question. But that question was decided against the plaintiff in the very first lawsuit when the jury exonerated Nationwide while finding against Shell. That verdict in favor of Nationwide explicitly exonerated Nationwide and thus was directly contrary to plaintiff's allegations that Shell was acting in the line and scope of his employment by Nationwide. Plaintiff did not appeal the judgment entered upon that verdict and it became final. Thus, no judgment was ever entered against any "dealer or agent of such dealer," as the statute clearly requires.
Moreover, in First Baptist Church of Grayson Valley, supra, this Court recognized *1261 as a matter of law that INA, Nationwide's surety, was "only liable for payment of any judgment that Nationwide should fail to pay. There is no judgment against Nationwide." Any question of the liability of INA, therefore, has also been judicially determined.
The essential elements of res judicata have been satisfied. These are that there has been a prior judgment on the merits (of Nationwide's and INA's liability) by a court of competent jurisdiction; identity of issues (as explained above); and substantial identity of parties. Desroches v. Ryder Truck Rental, Inc., 429 So.2d 1010 (Ala.1983). The parties were not rendered different by the inclusion of Ussery as an "interested party" under the declaratory judgment practice. See Code of 1975, § 6-6-227. For the purposes of res judicata, the joinder of additional parties does not prevent the bar to a later suit if the party against whom res judicata is asserted, the church here, was a party formerly. AAA Equipment & Rental, Inc. v. Bailey, 384 So.2d 107 (Ala.1980); Geer Bros. v. Crump, 349 So.2d 577 (Ala. 1977).
The other reason plaintiff cannot prevail is simply that its action was not timely. The sale of securities complained of occurred during 1977. Plaintiff bases its cause of action on the provisions of § 8-6-3(c). That subsection expressly provides:
"No action may be maintained to enforce any liability under the bond unless brought within two years after the sale or other action upon which such action is based."
This action was brought on January 11, 1984, almost seven years after the events made the basis of the defendants' liability, and thus this action could not be maintained. The plaintiff's contention that its cause of action against the dealer and INA did not arise until the jury returned a verdict against the agent, and thus that this action was timely, is untenable. Indeed, that contention supports the conclusion of this Court in First Baptist Church of Grayson Valley, supra, quoted above.
Let the judgment be affirmed.
AFFIRMED.
TORBERT, C.J., and MADDOX, JONES and SHORES, JJ., concur.
NOTES
[1]  Defendant Ussery, upon his motion, which met with no objection, was realigned as a party plaintiff.
