In this action, the plaintiffs, Herbert E. Vedder and Virginia T. Vedder, seek to recover compensation for work done in altering and repairing the home of the defendants, Harry F. Spellman and Alice G. Spellman. At *835the time this work was performed, the plaintiffs were not licensed to do contracting work, as required by RCW 18.27-.020, which provides:
It shall be unlawful for any person to submit any bid or do any work as a contractor until such person shall have been issued a certificate of registration by the state department of licenses. A partnership or joint venture shall be deemed registered if any one of the general partners or venturers whose name appears in the name under which the partnership or venture does business shall be registered. A violation of this section shall be a misdemeanor.
When the work which the plaintiffs contracted to do for the defendants was substantially finished, the defendants gave the plaintiffs a check for $2,500 which represented the major portion of the balance due on the agreed compensation. However, before the check was cashed, the defendants issued a stop payment order and the check was not honored by the bank.
The plaintiffs filed a complaint for money due. Upon motion of the defendants, filed after their answer and affirmative defense was filed, the trial court granted a summary judgment in their favor.
The sole question on appeal is whether the plaintiffs may recover upon the dishonored check. They concede that they cannot maintain an action upon the contract, being precluded by RCW 18.27.080, which provides:
No person engaged in the business or acting in the capacity of a contractor may bring or maintain any ‘action in any court of this state for the collection of compensation for the performance of any work or for breach of any contract for which registration is required under this chapter without alleging and proving that he was a duly registered contractor at the time he contracted for the performance of such work or entered into such contract.
The trial court held that the language of this section is broad enough to prohibit recovery by an unlicensed contractor upon a negotiable instrument given him in payment for work done. While the plaintiffs urge that this holding was in error, they do not suggest that the statutory provision *836is ambiguous. They simply contend that RCW 62A.3-802 (1) (b) governs this action. That provision of the Uniform Commercial Code reads, insofar as relevant here,
(1) Unless otherwise agreed where an instrument is taken for an underlying obligation
(b) ... If the instrument is dishonored action may be maintained on either the instrument or the obligation;
We find no quarrel with the plaintiff’s proposition that the Uniform Commercial Code should be liberally construed to effect its purposes. But we do not conceive that it was the purpose of this provision to give life to an obligation which the legislature has elsewhere declared unenforceable. The plaintiffs do not suggest that the provision gives them the right to sue upon the obligation itself, but they do contend that it gives them a right of recovery upon the dishonored check. They tacitly concede, in other words, that the language of RCW 18.27.080 is explicit and specific enough to bar a suit upon the obligation, notwithstanding the authority found in RCW 62A.3-802(1) (b) to maintain such a suit. But it appears to be their position that this language is not comprehensive enough to bar a suit on a check given in payment of the alleged obligation.
If RCW 18.27.080 merely provided that no suit could be brought “upon an obligation” incurred by reason of work done or contract breached, there arguably would be merit in the plaintiffs’ contention. At least the provision would be open to a charge of ambiguity. But the language of the statute is much broader. It bars any action for the collection of compensation. The plaintiffs cannot avoid the admission that this is a suit for compensation for the work which they did for the defendants at a time when they were not licensed to perform such work. Furthermore, RCW 62A.3-802(1), by its terms, applies only where there is an existing obligation.
It is axiomatic that a party may not accomplish by indirection that which he is specifically forbidden to do directly. The trial court correctly held that this suit upon a *837dishonored check, brought by the payee, an unlicensed contractor, cannot be maintained.
Obviously, we are not here concerned with the rights of a holder in due course. RCW 62A.3-802 (1) does not purport to affect the rights of such a holder but merely declares the effect of an instrument as payment of the obligation for which it is given. .See Official Comments on Uniform Commercial Code, RCWA 62A.3-802(1) at 489.
It has been suggested that the contract was not illegal and that, in equity, the respondents should be estopped to deny their indebtedness for the work which was actually performed and from which they received an actual benefit. The contention that the contract was not illegal is untenable. A contract that is contrary to the terms and policy of a statute is illegal and unenforceable. State v. Northwest Magnesite Co., 28 Wn.2d 1, 27, 182 P.2d 643 (1947). As Steinert, J., speaking for the court, said in that case, estoppel may not be used to enforce a promise which is contrary to a statute and to its policy. Quoting from Reed v. Johnson, 27 Wash. 42, 67 P. 381, 57 L.R.A. 404 (1902), this court said:
“The nonenforcement of illegal contracts is a matter of common public interest, and a party to such contract cannot waive his right to set up the defense of illegality in an action thereon by the other party. ... it becomes the duty of the court to refuse to entertain the action. . . . The appellants are not estopped to raise the illegality of the contract because of their course of dealing with respondents under the contract. Validity cannot be given to an illegal contract through any principle of estoppel.” (Italics ours.)
See the additional authorities which are cited therein, giving voice to the principle which is basic in the law that a contract which is forbidden by statute is an “illegal” contract and is unenforceable.
In Hederman v. George, 35 Wn.2d 357, 362, 212 P.2d 841 (1949), we approved the following statement taken from Pomeroy’s Specific Performance of Contracts § 286 (3d ed. 1926):
“Where two persons with equal knowledge and equally *838participating in the fault, have entered into an illegal agreement, and one of them has obtained by the other’s voluntary act all the benefit of it for himself, his refusal to perform on his own part is, generally considered in itself alone, unjust and inequitable; but the law sustains him in this position, because it takes into account the interests of society and of the state, which demand the complete suppression of such agreements.”
That case was also involved with a regulation of business (the sale of stock) designed, as the statute is here, to protect the public.
It is true that the act does not penalize a member of the public who contracts with lan unlicensed contractor and in fact affords him a windfall, but this does not make the contract a legal one as far as the contractor’s position and rights are concerned. The legislature has taken account of the fact that persons who contract with unlicensed contractors are often victimized and it has determined that an effective method of protecting the public from such contractors is to deny recovery to one who has actually performed work which he unlawfully contracted to perform.
It is true that the act does not give the innocent party a right to reimbursement if he has paid the contractor. Thus, a contractor who has been paid voluntarily is apparently allowed to retain the benefits of his unlawful act. However, it is clear that he may not obtain redress in the courts if the party for whom he has performed work refuses to pay. This is the “teeth” of the statute.
To say that because the work has been done and the respondent has benefited, he should have to pay is to ignore the express intent of the legislature and to emasculate the statute. If RCW 18.27.080 means anything at all, it means that, even though a contractor can prove in court that he did a masterful job and invested a great deal of time and money in the work, unless he can show that he was licensed when he entered into the contract he cannot maintain a suit for compensation. If the section does not deny compensation to one who would otherwise be entitled to compensation, it imposes no penalty at all. In accord is *839Grammar v. Skagit Valley Lbr. Co., 162 Wash. 677, 299 P. 376 (1931), upholding a trial court decision dismissing an action for a commission brought by an unlicensed real estate broker.
The judgment is affirmed.
Hunter, J., concurs.
Finley, J., concurs in the result.