
515 P.2d 1020 (1973)
John G. GATES, Appellant,
v.
RIVERS CONSTRUCTION CO., INC., and General Construction Co., Inc., Appellees.
No. 1801.
Supreme Court of Alaska.
November 9, 1973.
C.R. Kennelly, Anchorage, for appellant.
Jeffrey H. Roth and R. Everett Harris of Jensen & Harris, Anchorage, for appellees.
Before RABINOWITZ, C.J., and CONNOR, ERWIN, BOOCHEVER and FITZGERALD, JJ.

OPINION
BOOCHEVER, Justice.
A contract of employment was entered into in Alaska by a Canadian alien. The trial court held it to be in violation of the immigration and nationality laws of the United States, and held that the alien was barred by the illegality of the contract from securing recovery of sums allegedly due. This appeal has been taken from that decision.
In late February or early March of 1969, John G. Gates traveled from his home in Alberta, Canada, to Fairbanks, Alaska. His expenses were paid by Guy Rivers, acting on behalf of Rivers Construction Co. and General Construction Co., Inc. Gates entered into discussions with Rivers and, as a result, agreed to engage in public relations work in order to obtain construction contracts for the two companies. The work was to be performed in Alaska, and Gates was to receive a salary of $1,400 or $1,600 per month,[1] commencing immediately; the funds were to be placed in trust for him in a bank in Alaska and were to *1021 be paid to him when, and only when, he obtained a visa to remain in the United States as a landed alien or permanent resident. The arrangement to withhold his salary was made for the reason that both Gates and Rivers believed that Gates could not lawfully remain in Alaska and perform services for a salary without first having received certification of permanent resident status.
Gates' employment was terminated by the companies on December 4, 1970. He became a landed alien or "permanent resident" on December 11, 1970. In February of 1971 he filed suit against the two corporations alleging that no payment of the salary which was to have been held in trust for him had been made. The companies answered admitting that services were performed and denying other allegations of the complaint.
At the conclusion of appellant's case in the court below, the companies moved to dismiss on the grounds that the contract of employment was in violation of the immigration laws. Section 1182(a)(14) of 8 United States Code provides in part:
(a) Except as otherwise provided in this chapter, the following classes of aliens shall be ineligible to receive visas and shall be excluded from admission into the United States:
......
(14) Aliens seeking to enter the United States, for the purpose of performing skilled or unskilled labor, unless the Secretary of Labor has determined and certified to the Secretary of State and to the Attorney General that (A) there are not sufficient workers in the United States who are able, willing, qualified, and available at the time of application for a visa and admission to the United States and at the place to which the alien is destined to perform such skilled or unskilled labor, and (B) the employment of such aliens will not adversely affect the wages and working conditions of the workers in the United States similarly employed... .
The court granted the motion to dismiss, concluding that the contract of employment was "in violation of law, and as such, is a contract contrary to public policy, is void, and is unenforceable." From the judgment of dismissal, this appeal has been taken.
Generally, a party to an illegal contract cannot recover damages for its breach.[2] But as in the case of many such simplifications, the exceptions and qualifications to the general rule are numerous and complex. Thus, when a statute imposes sanctions but does not specifically declare a contract to be invalid, it is necessary to ascertain whether the legislature intended to make unenforceable contracts entered into in violation of the statute.
Among the factors taken into consideration by the courts are the language of the statute; its nature, object, and purpose; and its subject matter and reach; the wrong or evil which the statute seeks to remedy or prevent; the nature of the prohibited act as malum in se or malum prohibitum; the class of persons sought to be controlled; the legislative history; the effect of holding contracts in violation of the statute void; and the later repeal of the statute by a new act which specifically provides that a contract in contravention thereof should be void. If, from all these factors, it is manifest that the statute was not intended to render the prohibited act void, the courts will construe the statute accordingly (footnotes omitted).[3]
Applying these considerations to this case, it is clear that the contract involved *1022 here should be enforced. First, it is apparent that the statute itself does not specifically declare the labor or service contracts of aliens seeking to enter the United States for the purpose of performing such labor or services to be void. The statute only specifies that aliens who enter this country for such purpose, without having received the necessary certification, "shall be ineligible to receive visas and shall be excluded from admission into the United States."
Second, that the appellee, who knowingly participated in an illegal transaction, should be permitted to profit thereby at the expense of the appellant is a harsh and undesirable consequence of the doctrine that illegal contracts are not to be enforced.[4] This result, so contrary to general considerations of equity and fairness, should be countenanced only when clearly demonstrated to have been intended by the legislature. Third, since the purpose of this section would appear to be the safeguarding of American labor from unwanted competition,[5] the appellant's contract should be enforced because such an objective would not be furthered by permitting employers knowingly to employ excludable aliens and then, with impunity, to refuse to pay them for their services. Indeed, to so hold could well have the opposite effect from the one intended, by encouraging employers to enter into the very type of contracts sought to be prevented.
We find no such clear command indicated by the language or general purposes to be accomplished by the statute in question. Our conclusion in that regard is further bolstered by the fact that the predecessor to the present statute expressly made such contracts void and of no effect:
All contracts or agreements, express or implied, parol, or special, which may hereafter be made by and between any person, company, partnership, or corporation, and any foreigner or foreigners, alien or aliens, to perform labor or service or having reference to the performance *1023 of labor or service by any person in the United States, it Territories, or the District of Columbia previous to the migration or importation of the person or persons whose labor or service is contracted for into the United States, shall be utterly void and of no effect (emphasis added).[6]
That provision was repealed by the Immigration and Nationality Act of 1952 and was replaced with what is now 8 U.S.C. § 1182(a)(14), which does not make such contracts void, but merely provides, as a deterrent, for ineligibility to receive visas and for exclusion from admission into the United States. The repeal of the former section coupled with the new enactment evinces an intent on the part of Congress that such contracts are no longer to be "void and of no effect". Apparently, Congress determined that the exclusion of certain aliens from admission to the United States was a more satisfactory sanction than rendering their contracts void and thus unjustifiably enriching employers of such alien laborers.
There are no cases construing section 1182(a)(14) with reference to this issue. Cases interpreting the former section 141 are obviously of little value in view of the material changes in its provisions.[7] Even under the former section, however, one court permitted an alien who had entered the United States illegally to recover for services rendered under a contract which, as here, was entered into after the alien had entered the United States.[8] The court stated:
An examination of this enactment reveals that the contracts or agreements that are denounced and rendered unenforcible [sic] are only those made "previous" to the migration or importation into the United States of the person or persons whose labor or service is contracted for. It does not declare void or in any manner vitiate contracts or agreements made after their entry into the United States, even though such entry and continued presence is unlawful. The sole penalties prescribed for unlawful entry are deportation or fine and imprisonment; no civil rights or right to sue or seek redress in judicial tribunals is denied to an alien here under the circumstances mentioned, and I do not see how it can be read into the statute without violation basic rules of statutory construction.[9]
A leading and often cited case from another era, although involving a different factual background, is also pertinent. Harris v. Runnels[10] involved the sale of slaves brought into Mississippi in violation of that state's statute prohibiting the importation of slaves without a certificate indicating that they had not been guilty of a felony. The statute imposed a fine on the buyer and seller for each slave sold without compliance with the statute. The plaintiff sued the defendant for payment for the slaves.
The court explained that the defendant buyer stood in pari delicto with the seller "with this difference between them, that he is now seeking to add to his breach of the *1024 law the injustice of retaining the negroes without paying for them."[11] It concluded that such a result could not have been intended by the legislature under the terms of the statute construed. Further support for the decision was found in the subsequent repeal of the Mississippi statute, and a new enactment specifically providing that contracts in contravention of its provisions would be void. The court stated that:
There could not be, ... a stronger circumstance to show, that under the first statute in order, contracts in violation of it were not meant to be irrecoverable by suit.[12]
Because a subsequent harsher statute is at best a contemporary legislative interpretation of the former statute, the rationale for enforcing the contract is all the more compelling here, where the legislature which enacted the law being construed by us has expressly abrogated the harsher enactment. For the reasons set forth above, we therefore conclude that it was error to enter a judgment of dismissal, and the case is remanded for completion of the trial.[13]
Reversed and remanded.
NOTES
[1]  The salary was fixed at $1,400 per month in July of 1969 when Gates filed an application for permanent residence.
[2]  Restatement of Contracts, § 598 (1932) specifies:

Generally No Remedy on an Illegal Bargain.
A party to an illegal bargain can neither recover damages for breach thereof nor, by rescinding the bargain, recover the performance that he has rendered thereunder or its value, except as stated in §§ 599-609.
[3]  Annot., 55 A.L.R.2d 488-90.
[4]  Mansfield said, with a very proper sensibility of the injustice of such a plea, and of the policy which permits it to be insisted upon, "The objection, that a contract is immoral or illegal as between plaintiff and defendant, sounds at all times very ill in the mouth of a defendant. It is not for his sake, however, that the objection is ever allowed, but it is founded on general principles of policy, which the defendant has the advantage of, contrary to the real justice as between him and the plaintiff." Harris v. Runnels, 53 U.S. (12 How.) 79, 86, 13 L.Ed. 901, 904 (1851).
[5]  See H.R.Rep. No. 1365, 82d Cong., 2nd Sess. (1952), U.S.Code & Cong.Ad.News, p. 1705 (1952), which sets forth this purpose as follows:

H. Safeguards for American labor.
Those provisions in existing law relating to the exclusion of contract laborers and persons induced or assisted to come to this country and certain similar provisions are omitted from the bill in view of the adoption of a principle of selectivity in the allocation of quota numbers or permits for temporary residence on the basis of the need for the labor and services of aliens.
While the bill will remove the "contract labor clauses" from the law, it provides strong safeguards for American labor. Section 212(a)(14) [8 U.S.C. § 1182(a) (14)] provides for the exclusion of aliens seeking to enter the United States for the purpose of performing skilled or unskilled labor if the Secretary of Labor has determined that there are sufficient available workers in the locality of the aliens' destination who are able, willing, and qualified to perform such skilled or unskilled labor and that the employment of such aliens will adversely affect the wages and working conditions of workers in the United States similarly employed. This provision is applicable to all aliens other than those whose services have been determined to be needed in the United States under certain other provisions of the bill or who are entitled to preferential treatment because of their relationship to United States citizens or aliens who have been lawfully admitted for permanent residence. It is the opinion of the committee that this provision will adequately provide for the protection of American labor against an influx of aliens entering the United States for the purpose of performing skilled or unskilled labor where the economy of individual localities is not capable of absorbing them at the time they desire to enter this country.
[6]  Act of Feb. 26, 1885, ch. 164, § 2, 23 Stat. 332 (formerly 8 U.S.C. § 141) (repealed 1952).
[7]  See Coules v. Pharris, 212 Wis. 558, 250 N.W. 404 (1933), where it was held that an alien employed in a candy shop could not recover the wages he had earned. But in Roberto v. Hartford Fire Ins. Co., 177 F.2d 811, 813 (7th Cir.1949), the court wrote:

We need not pause to consider whether the decision in the Coules case is sound law, except to say that we know of no case which has followed it or cited it with approval.
But see Tompkins v. Seattle Constr. & Dry Dock Co., 96 Wash. 511, 165 P. 384 (1917). An alien who had been paid for all services performed prior to the termination of his contract was prohibited from recovering for the alleged breach of that contract, due to illegality under former sec. 141. See also Valdez v. Viking Athletic Ass'n, 349 Ill. App. 376, 110 N.E.2d 680, 682-683 (1953).
[8]  Dezsofi v. Jacoby, 178 Misc. 851, 36 N.Y.S.2d 672 (Sup.Ct.N.Y. 1942).
[9]  Id. at 675.
[10]  53 U.S. (12 How.) 79, 13 L.Ed. 901 (1851).
[11]  Id. at 85-86, 13 L.Ed. at 904.
[12]  Id. at 87, 13 L.Ed. at 904.
[13]  In view of our decision, we do not reach the issue of allowance of full attorney's fees to the defendants below.
