
145 Cal.App.3d 309 (1983)
193 Cal. Rptr. 350
NOEMI HERNANDEZ et al., Plaintiffs and Respondents,
v.
RUDOLPH STABACH, Defendant and Appellant.
Docket Nos. 66383, 66548.
Court of Appeals of California, Second District, Division Four.
July 22, 1983.
*311 COUNSEL
Morgan & Armbrister, Russell W. Westfall and Edward J. Horowitz for Defendant and Appellant.
Margolis, McTernan, Scope, Sacks & Epstein and Barbara Enloe Hadsell for Plaintiffs and Respondents.
OPINION
McCLOSKY, Acting P.J.
This is an appeal by defendant Rudolph Stabach from a preliminary injunction and order (2d Civ. No. 66383) and a *312 supplemental preliminary injunction and order (2d Civ. No. 66548). Both appeals were ordered consolidated for purposes of briefing.

CONTENTIONS ON APPEAL
Defendant contends that the preliminary injunction dated July 9, 1981, is overbroad and improper, because it required him to obtain prior leave of court to file unlawful detainer actions in municipal court against any plaintiff based upon nonpayment of rent or maintenance of illegal overcrowded conditions in an apartment.

FACTS
On April 16, 1981, several tenants of an apartment complex owned by defendant and located at 1953-1959 Estrella Avenue, Los Angeles, California, commenced this class action on behalf of all tenants living in the apartment complex.[1]
The gravamen of plaintiffs' complaint[2] is that the premises are infested with rodents, roaches and vermin, in a serious state of disrepair, dangerous, unsanitary, unhealthy, uninhabitable and in gross violation of applicable building and health and safety laws, ordinances and regulations and that defendant instituted unlawful detainer actions in retaliation for plaintiffs' exercise of their statutory rights to demand the premises to be maintained in a habitable condition. Among other things, plaintiffs sought injunctive relief.
On or about July 9, 1981, the trial court issued a preliminary injunction and order which, as subsequently amended by interlineation on July 22, 1981, and August 14, 1981, restrains defendant (1) from evicting, harassing or threatening to evict any plaintiff without first making a showing of good cause to the superior court, (2) from transferring ownership of the premises without giving the new owners notice of all applicable orders of the superior court, (3) from violating any applicable building or health and safety codes, *313 ordinances, regulations and laws and (4) from refusing or failing to make certain enumerated repairs, corrections and modifications to the apartment complex.
Counsel for the parties were ordered to establish a joint trust account into which plaintiffs were to pay rent as it became due.[3]
On or about September 4, 1981, a supplemental preliminary injunction was filed and entered. It mandated that defendant undertake certain repairs and alterations.

DISCUSSION
(1a) On appeal, defendant Stabach attacks only that portion of the preliminary injunction that restrains him from "[e]victing, harassing, or threatening to evict the plaintiffs without a prior showing of good cause being made to [the superior] Court."
The challenged portion of the preliminary injunction does not enjoin defendant from initiating unlawful detainer actions against any plaintiff for nonpayment of rent or overcrowding  i.e., deny him access to the courts. Rather, it requires only that he obtain leave of the superior court to institute such actions in the municipal court. The injunction does not prohibit the institution of unlawful detainer actions if a showing of good cause is made.
(2) As we noted in Gosney v. State of California (1970) 10 Cal. App.3d 921, 924 [89 Cal. Rptr. 390], "[t]he grant or refusal of a preliminary injunction is, generally speaking, within the discretion of the trial court and its order may be reversed on appeal only if abuse of discretion is shown." None of the cases cited by defendant compels a contrary result. We conclude that the trial court did not abuse its discretion and accordingly affirm the orders.
(1b) The trial court's decision to issue a preliminary injunction restraining defendant from evicting any plaintiff without first making a showing of good cause to the court was grounded on the court's inherent equity power and Business and Professions Code sections 17200 and 17203.
This is not a doubtful case within the meaning of Code of Civil Procedure section 526. The court has exercised its discretion in favor of plaintiffs who are the parties most likely to be injured and who will suffer irreparable damage unless defendant is restrained pending trial.
*314 Business and Professions Code section 17203 provides: "Any person performing or proposing to perform an act of unfair competition within this state may be enjoined in any court of competent jurisdiction. The court may make such orders or judgments, including the appointment of a receiver, as may be necessary to prevent the use or employment by any person of any practice which constitutes unfair competition, as defined in this chapter, or as may be necessary to restore to any person in interest any money or property, real or personal, which may have been acquired by means of such unfair competition."
Business and Professions Code section 17204 in relevant part provides: "Actions for injunction pursuant to this chapter may be prosecuted by ... any person acting for the interests of itself, its members or the general public."
(3), (1c) Unfair competition as it is used in Business and Professions Code section 17200 (formerly Civ. Code, § 3369) includes any business practice that is forbidden by law. (Barquis v. Merchants Collection Assn. (1972) 7 Cal.3d 94, 113 [101 Cal. Rptr. 745, 496 P.2d 817].)
Several declarations submitted in support of plaintiffs' application for injunctive relief set forth that defendant rented to families knowing that they would overcrowd the apartment. When, however, the tenants formed an association and asserted their statutory rights (e.g., withheld rent for repairs after giving notice (Civ. Code, § 1942, subd. (a))) in an attempt to end the uninhabitable, dangerous and unhealthful conditions, defendant began to file unlawful detainer actions on the basis of overcrowding against several tenants who openly participated in the association.
The trial court found that defendant's institution of unlawful detainer actions on the basis of overcrowding was an unlawful business practice since defendant had accepted the rentals knowing that overcrowding would occur. We agree.
Defendant's institution of such proceedings was an integral part of his unlawful business practice of maintaining substandard, dangerous, unhealthy, unsanitary housing and permitting overcrowded conditions in the apartments. It was only after the tenants' association was formed and statutory rights were exercised that he undertook to file unlawful detainer actions against tenants for overcrowding.
The chronology of events herein indicates that defendant's motive for instituting unlawful detainer actions was retaliatory within the meaning of Civil Code section 1942.5, subdivision (a). When retaliatory eviction is a *315 business practice within the meaning of Business and Professions Code section 17200, it may be enjoined under Business and Professions Code section 17203.
Defendant's retaliatory motive is supported by a further declaration which reveals that defendant rented an apartment to one family knowing that it would overcrowd after he had filed an action for unlawful detainer for overcrowding against one of the leaders of the tenants' association.
We conclude that it was within the court's inherent equity power and the power conferred upon it by Business and Professions Code section 17203 to enjoin defendant from evicting or attempting to evict any plaintiff without first obtaining permission from the court. (4) (See fn. 4.) By requiring defendant to seek leave of court, the trial court sought to monitor and prevent defendant's retaliatory attempts to evict tenants who assert their rights.[4]
(1d) The hardship, if any, to defendant in requiring him to show that his desire to evict someone is motivated by a legitimate reason is insignificant when compared to the irreparable harm plaintiffs will suffer if they are required to defend a multiplicity of lawsuits or are evicted.
(5) Defendant contends that the challenged provision of the preliminary injunction is overbroad and improper because it sanctions illegal conduct by plaintiffs, unduly restrains defendant from altering his own illegal assent to overcrowding, and exposes him to potential civil and criminal liability.
The trial court correctly found that this defendant does not come to court with clean hands and concluded that defendant could not raise overcrowding by plaintiffs as a defense against injunctive relief since he rented to families knowing that overcrowding would occur.
Defendant's plausibility in maintaining that he is unduly restrained from altering his illegal consent to overcrowding might be greater had he not, subsequent to his filing of an unlawful detainer action for overcrowding, rented to at least one more family cognizant that overcrowding would occur in those rented premises.
The following colloquy, which took place at the first hearing on the application for a preliminary injunction, is effectively dispositive of defendant's last concern regarding the imposition of civil or criminal penalties:
*316 "MR. WESTFALL [defendant's attorney]: As to your granting of the preliminary injunction against bringing the unlawful detainer actions, is it your intent to allow the plaintiffs to continue to maintain a condition of overcrowding in the premises, which the defendant is not 
"THE COURT: Until such time as the City or the County is prepared to do anything about it, I am convinced that the unclean hands arguments that are advanced by the plaintiffs prevent your client from asserting that.
"I think your client took them in with full knowledge as to how many people were living in those units. Your client accepted the rents. And I don't think your client can now come back and say, `We have the right to bring unlawful detainer actions to get them out, because they have too many people there.'
"Even the City doesn't require that. If the City ever threatens your client for not having done that, you come back and we will take another look.
"MR. WESTFALL: All right."
(1e) With regard to the nonpayment of rent, defendant contends that the challenged portion of the injunction is void because it restrains him from exercising his statutory right to file unlawful detainer actions for nonpayment of rent (see People v. Kelley (1977) 70 Cal. App.3d 418, 422 [138 Cal. Rptr. 681]) and that an injunction forbidding initiation of eviction proceedings must be refused as long as plaintiffs would not be forced to vacate their apartments prior to judgment in an unlawful detainer proceeding and plaintiffs have an adequate legal remedy  i.e., they can assert retaliatory eviction as a defense in an action for unlawful detainer. (See Taliaferro v. Industrial Ind. Co. (1955) 131 Cal. App.2d 120, 122 [280 P.2d 114]; Johnson v. Sun Realty Co. (1934) 138 Cal. App. 296, 301-302 [32 P.2d 393].)
These contentions are meritless. As stated earlier, that portion of the preliminary injunction challenged on appeal does not enjoin defendant from commencing unlawful detainer actions. Accordingly we need not, and do not, address this contention.
Defendant next contends that his purported past attempts at retaliatory eviction cannot justify the requirement that he make a showing of good cause prior to instituting an unlawful detainer action for nonpayment of rent since retaliatory eviction is not recognized as a defense in such an action.
Civil Code section 1942.5, subdivision (a) in pertinent part provides: "(a) If the lessor retaliates against the lessee because of the exercise by the lessee *317 of his rights under this chapter or because of his complaint to an appropriate agency as to tenantability of a dwelling, and if the lessee of a dwelling is not in default as to the payment of his rent, the lessor may not recover possession of a dwelling in any action or proceeding, ..." (Italics added.)
We need not restate the obvious. Defendant is not precluded by the court's preliminary injunction or order from seeking to evict any tenant for nonpayment of rent. He may do so, however, only after seeking leave of the court. In view of the record upon which the trial court's preliminary injunction and order were based this result appears to be eminently reasonable to us. If leave to proceed is wrongfully denied, he may seek the appropriate remedy at that time.
For the same reasons we also reject as meritless defendant's assertion that "the `benefits' accruing to plaintiffs from this provision of that injunction amount to an opportunity to live `rent free' in their apartments, ..." The trial court did not abuse its discretion in any way.
The preliminary injunction and order and supplemental preliminary injunction and order are affirmed.
Amerian, J., and Lachs, J.,[*] concurred.
On August 15, 1983, the opinion was modified to read as printed above.
NOTES
[1]  Several tenants of an apartment complex located at 681 South Burlington, Los Angeles, California, joined in the action. Neither these particular tenants nor any of those residing at 681 South Burlington in whose behalf this class action was also instituted, however, are parties to this appeal.

The preliminary injunction and order and supplemental preliminary injunction and order from which defendant Stabach appeals pertain solely to the apartment complex located at 1953-1959 Estrella Avenue.
[2]  Plaintiffs' complaint includes 266 causes of action and is entitled "Complaint for Injunctive Relief; Unfair Business Practices; Breach of Warranty of Habitability and For Rent Abatement; Breach of Covenant of Quiet Enjoyment; Nuisance; Negligent and Intentional Infliction of Personal Injury and Emotional Distress and Fraud."
[3]  Contrary to defendant's assertion, the trial court did not set or approve the amount of rent to be paid into the joint account.
[4]  There exists "in unlawful detainer actions a defense that the eviction is sought in retaliation for the exercise of statutory rights by the tenant." (Schweiger v. Superior Court (1970) 3 Cal.3d 507, 517 [90 Cal. Rptr. 729, 476 P.2d 97].)
[*]   Assigned by the Chairperson of the Judicial Council.
