
748 So.2d 198 (1999)
J & M BAIL BONDING COMPANY and AA Bail Bonding, Inc.
v.
James HAYES, as Sheriff of Etowah County.
1980787.
Supreme Court of Alabama.
November 5, 1999.
Jack Floyd of Floyd, Floyd & Floyd, Gadsden, for appellants.
James E. Turnbach of Turnbach & Warren, P.C., Gadsden, for appellee.
JOHNSTONE, Justice.
J & M Bail Bonding Company and AA Bail Bonding, Inc., are professional bonding companies owned by Ronald McCoy. They are authorized to act as sureties and to issue bail bonds in Etowah County. On or about August 29, 1998, James Hayes, sheriff of Etowah County, learned that McCoy had caused Richard Briggs, a corrections officer at the Etowah County Detention Center, to block telephone calls from inmates to Eagle Bonding Company, a major competitor of J & M and AA. Sheriff Hayes considered McCoy's involvement in blocking telephone calls to another bonding company a compromise of the security of the jail. He terminated the rights of J & M and AA to issue bail bonds for inmates at the Etowah County Detention Center. J & M and AA petitioned the Etowah County Circuit Court to enjoin Sheriff Hayes from revoking their right to issue bonds at the county detention center. J & M and AA argued that only the presiding judge had the authority, pursuant to § 15-13-163, Ala.Code 1975, to revoke their right to issue bail bonds.
*199 The trial court conducted a hearing on the petition of J & M and AA for injunctive relief. At the hearing, Briggs, who owed money to McCoy, admitted that he had blocked telephone calls from the inmates to Eagle Bonding Company around August 24, 1998, and that Sheriff Hayes had fired him for his actions. Briggs stated also that, before he blocked the calls to Eagle, he had a conversation with McCoy and "kiddingly" told McCoy that he (Briggs) should block the inmates' telephone calls to all bonding companies except calls made to J & M and AA. Although both Briggs and McCoy testified that McCoy did not influence Briggs to block calls to other bonding companies, two tape-recorded conversations admitted into evidence at trial revealed that McCoy had expressed to Briggs his concern that Eagle was getting more business than J & M and AA, that McCoy had commended Briggs for "handling his part" in blocking calls to Eagle, and that McCoy had asked Briggs to block the calls to Eagle every other week.
After considering the evidence, including the testimony of Briggs, McCoy, and Hayes, the trial court found that J & M and AA had "unclean hands" because McCoy had participated with Briggs in blocking telephone calls to Eagle. On the ground of the clean hands doctrine, the trial court denied the prayer by J & M and AA for injunctive relief.
J & M and AA argue that under § 15-13-163 only the presiding judge, not the sheriff, has the right to revoke their authority as professional bail bonding companies to act as sureties and to issue bail bonds to inmates in the Etowah County Detention Center. They contend that the trial court therefore should have granted them equitable relief against Sheriff Hayes.
This Court has recognized that one "who seek[s] equity must do equity" and "one that comes into equity must come with clean hands." Levine v. Levine, 262 Ala. 491, 494, 80 So.2d 235, 237 (1955). The purpose of the clean hands doctrine is to prevent a party from asserting his, her, or its rights under the law when that party's own wrongful conduct renders the assertion of such legal rights "contrary to equity and good conscience." Draughon v. General Fin. Credit Corp., 362 So.2d 880, 884 (Ala.1978). The application of the clean hands doctrine is a matter within the sound discretion of the trial court. Lowe v. Lowe, 466 So.2d 969 (Ala.Civ.App.1985).
In this case, the trial court, sitting without a jury, considered evidence presented ore tenus. The trial court found that, because of McCoy's wrongful conduct, J & M and AA came before the court with "unclean hands." "[W]here ore tenus evidence is presented to the trial court in a nonjury case, a judgment based on that evidence is presumed to be correct and will not be disturbed on appeal unless a consideration of the evidence and all reasonable inferences therefrom reveals that the judgment is plainly and palpably erroneous or manifestly unjust." Arzonico v. Wells, 589 So.2d 152, 153 (Ala.1991). Because the record supports the unclean hands finding by the trial court, its denial of equitable relief to J & M and AA is valid on the ground of the clean hands doctrine.
Therefore, we affirm the judgment of the trial court in this case. Because the plaintiffs' claim for relief is barred by equity, this Court does not reach the merits of the plaintiffs' argument that under § 15-13-163 only the presiding judge, not the sheriff, has the power to prohibit a professional bail bonding company from issuing bail bonds.
AFFIRMED.
HOOPER, C.J., and MADDOX, HOUSTON, COOK, SEE, LYONS, BROWN, and ENGLAND, JJ., concur.
