
498 P.2d 644 (1972)
Carleen YORK, on behalf of herself and all others similarly situated, Plaintiffs-Appellees,
v.
STATE of Hawaii et al., Defendants-Appellants.
No. 5159.
Supreme Court of Hawaii.
June 9, 1972.
Nobuki Kamida, Deputy Atty. Gen., Honolulu, State of Hawaii (George Pai, Atty. Gen., and Sonia Faust, Deputy Atty. Gen., on the brief), for appellants.
Andrew Levin, Associate Counsel (Hawaii Legal Services Project, Legal Aid Society of Hawaii, of counsel, Hilo), for appellees.
Before RICHARDSON, C.J., and MARUMOTO, ABE, LEVINSON and KOBAYASHI, JJ.
*645 KOBAYASHI, Justice.
The State of Hawaii and various Hawaii public officials (hereinafter the State) appeal from a decision of the circuit court holding that Hawaii's durational residence requirement for public employment violates the Equal Protection Clause of the United States Constitution.
Appellee, Carleen York, was hired by the State Department of Education as a general aide at Keaau Elementary and Intermediate School. She was dismissed therefrom when it was learned that she failed to meet the three-year residency requirement for public employment contained in Section 78-1(a), Hawaii Revised Statutes. The trial court, in an action for declaratory judgment, found the statute constitutionally invalid and the contract between the State and appellee binding. A prohibitory injunction was granted, enjoining the State from enforcing the three-year residency requirement. Damages were awarded in the sum of $895.77, based on the contract provisions less an amount made by appellee in mitigation of her damages during the contract period. The injunction and judgment of the trial court were suspended and stayed during the pendency of this appeal.
Hawaii Revised Statutes, § 78-1(a), provides in pertinent part that:
All officers, whether elective or appointive, and all employees in the service of the government of the State or in the service of any county or municipal subdivision of the State ... shall be ... residents of the State for atleast three years immediately preceding their appointment.
The above statute clearly creates two classes of residents applying for public employment. One class is composed of applicants who have resided for three years or more in the State, and the other of applicants who have resided in the State for less than three years. The question is whether this type of discrimination against the class with less than three years of residence is legally justifiable.
Whether HRS § 78-1(a) stands in violation of the Equal Protection Clause, involves essentially an examination of three criteria: "the character of the classification in question; the individual interests affected *646 by the classification; and the governmental interests asserted in support of the classification." Dunn v. Blumstein, 405 U.S. 330, 92 S.Ct. 995, 999, 31 L.Ed.2d 274 (1972).
Appellant adamantly asserts that the less burdensome traditional rational basis test, as opposed to the compelling State interest test utilized by the trial court, be applied in determining the constitutionality of the statute in question. Apparently, it is appellant's belief that the rational basis test is easily met by the State in this case. We cannot agree.
We set forth the rational basis test in Hasegawa v. Maui Pineapple Co., 52 Haw. 327, 329, 475 P.2d 679, 681 (1970),
[I]n exercising this right to classify in order to achieve social goals the legislature may not act arbitrarily; that is, the classification of a particular group as a subject for regulation must be reasonable in relation to the purpose of the legislation. As the Supreme Court stated in Allied Stores of Ohio [Inc.] v. Bowers, 358 U.S. 522, 527, 79 S.Ct. 437, 441, 3 L.Ed.2d 480 (1959):
[T]here is a point beyond which the State cannot go without violating the Equal Protection Clause. The State must proceed upon a rational basis and may not resort to a classification that is palpably arbitrary. The rule often has been stated to be that the classification "must rest upon some ground of difference having a fair and substantial relation to the object of the legislation."[1]
The State in its brief stresses that "it can readily be seen that Section 78-1(a) is constitutional. It rests upon rational basis concerning the right of the State, as an employer, to employ as officers and employees, persons with Hawaiian residency of three years or more." It is beyond question that the State of Hawaii, as an employer, can in its discretion require high standards of qualification from those of its residents it selects to employ. However, such discretion is not absolute. The argument that the State possesses the rights of a private employer and may freely regulate the terms and conditions of public employment has been rejected by the Supreme Court of California stating that "the state may not arbitrarily foreclose to any person the right to pursue an otherwise lawful occupation. Any limitation on the opportunity for employment impedes the achievement of economic security, which is essential for the pursuant [sic] of life, liberty and happiness; courts sustain such limitations only after careful scrutiny... . [W]e may no longer question that state regulation of public employment must accord with the Fourteenth Amendment." Purdy & Fitzpatrick v. State, 71 Cal.2d 566, 79 Cal. Rptr. 77, 86-89, 456 P.2d 645, 654-657 (1969).
As suggested in Dunn v. Blumstein, supra, the "individual interests affected by the classification" are of primary significance in the application of the doctrine of equal protection. Such a fundamental interest as the right to work[2] and thereby sustain one's self and family cannot be impinged absent a showing of a rational relationship to a countervailing legitimate interests on the part of the State. A three-year durational residency requirement does not provide a rational connection for determining whether an applicant has the capacity and fitness to adequately serve as a public employee. A rational relationship to a legitimate State interest that justifies imposing three years' residency as a prerequisite to qualifying for employment with the State has not been demonstrated in this case.[3] The statute *647 creates an arbitrary classification without rational relation to a public employee applicant's capabilities of performing satisfactorily for the State[4] and operates irrationally without reference to any legitimate State interest. The discrimination imposed by HRS § 78-1(a) denies arbitrarily to certain persons, merely because of their status as residents of less than three years' duration,[5] the right to pursue otherwise lawful occupations. It is therefore unconstitutional.
We have held that HRS § 78-1(a) exists without a rational basis. It was not necessary for the trial court to judge the statute under the more burdensome and stricter compelling State interest test in conjunction with the right to travel. We recognize, however, that the compelling State interest test has been held applicable in cases involving suspect classifications, Korematsu v. United States, 323 U.S. 214, 216, 65 S.Ct. 193, 89 L.Ed. 194 (1944) (racial classifications), and fundamental rights, Shapiro v. Thompson, 394 U.S. 618, 89 S.Ct. 1322, 22 L.Ed.2d 600 (1969) (right to travel). In Dunn v. Blumstein, supra, 92 S.Ct. at 1003, the Supreme Court, citing Shapiro, stated that "durational residence laws must be measured by a strict equal protection test: they are unconstitutional unless the State can demonstrate that such laws are `necessary to promote a compelling governmental interest.'"
Appellant argues that appellee should not be allowed to recover damages. In support of its position appellant cites Brown v. Provisional Government, 9 Haw. 311 (1893). We find the Brown decision to be clearly distinguishable and inapposite to the situation before us. In Brown the court held that a politically appointed State officer, claiming color of title to the office but ousted from his job and replaced by another appointee, could not recover his salary from the government after he was reinstated. In the instant case an individual employee contract is involved. The better rule provides that the State is liable where it is found to be in breach of contract and a question of governmental immunity is not involved. See Souza & McCue Construction Co. v. Superior Court of San Benito, 57 Cal.2d 508, 20 Cal. Rptr. 634, 370 P.2d 338 (1962). As such the trial court's award as to damages is upheld.
Judgment affirmed.
NOTES
[1]  For a post Shapiro v. Thompson utilization of the traditional rational basis test see Dandridge v. Williams, 397 U.S. 471, 485, 90 S.Ct. 1153, 25 L.Ed.2d 491 (1970).
[2]  For an expansion of this rationale see Van Alstyne, The Demise of the Right-Privilege Distinction in Constitutional Law, 81 Harv.L.Rev. 1439, 1461-64 (1968).
[3]  In relation to this particular issue, we adopt the language of the trial court in refuting what appears to be appellant's strongest argument for justifying such a lengthy period.

The defendants, it appears contend that the three year residency requirement would lead to better government service because "in many positions knowledge of local linguistic expressions and customs is a desirable, if not a necessary qualification,". .. . I think it fails to support the premise that it makes for better government service... . Examine the jobs of the janitor, carpenter, mechanic, truck driver, engineer, draftsman, clerk, stenographer. Is there a significant need for them to have such knowledge? Is there a significant difference in the performance of such a job whether it is in California or in Hawaii? The answer is no. To require all to reside three years so that they may hopefully acquire such capacities is arbitrary. If there are jobs that make such demands a special test should be given to qualify the applicant. A three year residence requirement does not in any way guarantee that it will give one those special capacities to serve better in a job that requires such special knowledge. In fact, a three year residence requirement will detract from government service for there are many who are eminently qualified and cannot be employed because of the handicap imposed by Section 78-1(a).
[4]  See Schware v. Board of Bar Examiners, 353 U.S. 232, 239, 77 S.Ct. 752, 1 L.Ed.2d 796 (1957).
[5]  The trial court stated that "[t]he reason for the residency requirement is more correctly set out in the following language:

"`This bill, if enacted, will assure better opportunity for local persons to secure public offices and positions.' "Taken from the 1935 Senate Journal at page 228, it was in regard to a bill that later became a part of Section 78-1, HRS. The language will also necessarily mean that the intent of the bill was to prohibit those with less than the required residence period to secure government jobs."
