OPINION
By the Court,
Springer, J.:The State of Nevada entered into an agreement with appellant Robert Cohen that it would not consider Cohen’s past criminal record as grounds for denying “any” application for a restricted gaming license. The State repudiates its agreement and, contrary to its agreement, has denied Cohen’s application based upon “his prior bad acts.” The State does not argue that it has not violated its agreement; it merely says that Cohen cannot do anything about it and that its violation of the agreement is “not subject to judicial review.” We reverse the trial court’s dismissal of Cohen’s complaint for judicial review and hold that the State is morally and legally bound to honor its agreement.
We take the facts of this case from the State’s answering brief. The agreement between the State and Cohen takes the form of a formal, written stipulation executed by Cohen and the Gaming Control Board and “accepted by the [Gaming] Commission.” The intent and purpose of the stipulation was to resolve a complaint that the State had filed against Cohen to revoke his gaming *182license at the Downtowner Hotel in Las Vegas, based on Cohen’s felony conviction. Cohen stipulated that he would relinquish his gaming license and pay a $2,000.00 fine; and the State stipulated that Cohen’s felony conviction would not be used as the “sole grounds” to deny “any subsequent applications” that he might make for a restricted gaming license. (Emphasis added.)
According to the State’s brief, Cohen, in 1990, applied for a new license at the Downtowner; and
“[pjursuant to the terms of the Stipulation [], since COHEN had not had any further problems and the location remained suitable, the Board [in accordance with its stipulation] did not consider COHEN’s prior bad acts, and recommended that COHEN be granted a new restricted license to conduct gaming at the Downtowner Hotel. []. The COMMISSION considered the matter . . . and . . . granted COHEN a new restricted license to conduct gaming at the Downtowner Hotel.
In 1994, Cohen filed another, “subsequent application[],” relying on the stipulation, which specifically provided for Cohen’s “applying for a gaming license at a location(s) other than [the Downtowner].” (Emphasis added.) When Cohen applied in 1994 for a license at the other location, namely, the Center Strip Inn, the Board, despite its previously having recommended licensing on Cohen’s 1990 application, decided to repudiate its agreement, and, as put in the State’s brief,
After considering COHEN’s arguments for licensure, the BOARD recommended that the application be denied based upon COHEN’s prior “bad acts.”
The COMMISSION considered COHEN’s Center Strip Inn application and the terms of the Stipulation in its May 1994 meeting. []. COHEN then argued that the Stipulation did apply to license applications for new locations. []. The COMMISSION disagreed and voted unanimously to follow the recommendation of the BOARD and deny COHEN’s application based upon his prior bad acts.
In response to the State’s actions, Cohen filed a civil complaint urging that the State’s agreement was legally enforceable against the State and that the stipulation barred the State from denying his “application based upon his prior bad acts.” As said above, the State does not deny that it violated the stipulation; it merely argues that Cohen cannot do anything about it. According to the State’s brief, the State’s contractual obligation under the stipulation has “no bearing on whether or not the District Court had jurisdiction to consider COHEN’s civil action appealing the *183denial of a gaming license application”; and, also according to the State’s brief, the district court did not even “consider the terms of the Stipulation.”
The State misapprehends the issue raised by Cohen on appeal. Cohen is not, as claimed by the State, “appealing the denial of a gaming license”; rather, Cohen is collaterally attacking the improper and oppressive manner in which his gaming application was treated by the State. In his opening brief, Cohen expresses his understanding that “[o]rdinarily [there is no] judicial review of the denial of a gaming license.” Cohen’s only claim in this appeal is that
an agreement made with an existing licensee, and the prior conduct of the Board and the Commission gave plaintiff judicially recognized rights not otherwise possessed by previously unlicensed applicants. Consequently, the dismissal of plaintiff’s claims should be reversed and plaintiff’s action remanded for further proceedings.
We agree.
At first blush, it might appear that the district court was correct in denying judicial review. NRS 463.220(7) provides that the “commission has full and absolute power and authority to deny any application for any cause it deems reasonable.” In addition, “¿Judicial review is not available for actions, decision and orders of the commission relating to the denial of a license . . . .” NRS 463.318(2). In the face of such clear statutory language one might wonder if judicial intervention is ever warranted in cases involving denial of a gaming license; still, there are cases in which judicial intervention in gaming matters is called for. For example, if an applicant were to make a claim that the administrative action denying an application was tainted by reason of corruption or coercion of public officials in the form of gaming control administrators’ being bribed or coerced into denying the license, judicial cognizance would have to be given to such a claim. In such an instance the legislature must be assumed not to have had either the power or the intention to deprive a judicial forum to one making claims of this nature.
Although, generally speaking, the granting of a privileged gaming license is a discretionary act not subject to judicial review, this does not mean that ultra vires actions which go beyond the powers granted to administrative agencies and personnel are immune from collateral review by the courts. The case now before us does not involve such extremes as official corrup*184tion, but it does involve improper and unlawful repudiation of a stipulated agreement between the State and a license applicant. There appears to be no doubt here that the State entered into a contract with Cohen, that the State legally obligated itself to refrain from doing certain things and that it later refused to honor that agreement. The courts cannot countenance such a cavalier trodding upon its citizens’ legal rights. As put in Williams v. City of North Las Vegas, 91 Nev. 622, 626, 541 P.2d 652, 655 (1975): “[WJhether to enter into the contract in the first instance was within the discretion of the city, but once the contractual relationship was established, the contract became an operational function imposing upon the city the duty [to perform under the contract].” In the case before us, the State had wide discretion as to whether to enter into the contract, but once the contractual relationship was established, performance of the contract, in the language of Williams, “became an operational function” imposing upon the State the moral and legal duty to abide by its agreement.
Cohen is not asking the court to order that he be granted a license; all he asks is that the State act rightly and in accordance with its contractual obligation. He is certainly entitled to this much.
The district court’s order dismissing Cohen’s complaint is reversed, and the matter is remanded to the district court with instructions that it enter an order commanding the Gaming Board and the Gaming Commission to reconsider Cohen’s application for a gaming license and that these agencies consider Cohen’s application in the light of the binding 1990 stipulation that they not consider Cohen’s criminal conviction “as the sole grounds” for denying his license application for the Center Strip Inn.
Chairez, D. J., and Sullivan, D. J., concur.1,2