
860 P.2d 1228 (1993)
Leonard PAVONE, Appellant,
v.
Anthony PAVONE, Appellee.
No. S-5114.
Supreme Court of Alaska.
October 15, 1993.
*1229 James F. Vollintine, Anchorage, for appellant.
Ernest Z. Rehbock, Rehbock & Rehbock, Anchorage, for appellee.
Before MOORE, C.J., and RABINOWITZ, BURKE, MATTHEWS and COMPTON, JJ.

OPINION
BURKE, Justice.
Leonard Pavone brought this action to recover a commercial fishing limited entry permit which he had earlier transferred to his son, Anthony Pavone. The superior court refused to order the return of the permit because of the illegality, under AS 16.43.150(g)(2), of Leonard's oral retransfer agreement with his son. We affirm.

I. FACTS AND PROCEEDINGS
In 1975, Leonard Pavone applied for a Bristol Bay limited entry permit. AS 16.43.140. The Alaska Commercial Fisheries Entry Commission ("CFEC") rejected his application. To continue fishing, Leonard purchased a permit from Sergio Conte.
In 1980, following the announcement of our decision in State, CFEC v. Templeton, 598 P.2d 77, 81 (Alaska 1979), Leonard requested the CFEC reconsider his application. The CFEC refused to do so, but in Cashen v. CFEC, 686 P.2d 1219, 1220 (Alaska 1984), we ordered the CFEC to reconsider Leonard's application. Leonard became eligible for an interim-use permit while his permit application was pending before the CFEC. The interim use permit was in addition to the permit he had purchased from Sergio Conte.
Because Leonard could not operate two Bristol Bay gill net permits at once, see AS 16.43.140(c), Leonard transferred the Conte permit to his son Anthony in June 1986. Anthony paid nothing for the Conte permit. In signing the "Request for Permanent Transfer" Leonard swore, "under penalty of perjury,... that this transfer is not requested as part of, nor in anticipation of, *1230 any retained right of repossession... ."[1] As part of the transfer, Leonard and Anthony signed a "Transfer Survey Affidavit" in which they answered four questions. First, they responded "yes" to the question, "Is the permit being transferred as a gift without any conditions?" Next, they responded "no" to the question, "Is there an agreement for the proposed transferee to return the permit to the current holder or to transfer it to someone else at any time?" Third, they answered "no" to the question, "Is there an agreement by which the proposed transferee will pay the transferor a portion of the earnings from fishing the permit?" Finally, when asked to describe any other conditions or arrangements to which they had agreed, they responded "none!"
These documents were signed under oath before Marilyn Russell, who ran the CFEC pilot program for Bristol Bay. Russell discussed each of the paragraphs "many times" with Leonard and Anthony. Despite the plain language of the documents, Leonard made it clear to Russell that he wanted the Conte permit back if his permit application were denied by the CFEC. According to Russell, Anthony verbally agreed that at some future date he would give the permit back. Russell told Leonard and Anthony that if they referenced their retransfer agreement on the "Request for Permanent Transfer" the CFEC would not accept it. She warned both of them that, regardless of what they had agreed to, Anthony would not have to return the permit under the terms of the agreement.
Anthony fished the Conte permit during the 1986-88 fishing seasons. After the close of the 1988 fishing season, Anthony returned to California and notified the CFEC that he intended to keep the Conte permit.
In February 1989, Leonard filed suit against Anthony in California seeking the return of the Conte permit. In August 1989, Anthony filed a complaint in Anchorage against three Bristol Bay fish processors to recover all money paid to Leonard under the Conte permit during 1986-88. In July 1990, Leonard filed a complaint against Anthony in Anchorage seeking the return of the Conte permit and damages for Anthony's use of the permit subsequent to the 1988 season. Anthony answered and raised numerous counterclaims to this suit, including malicious prosecution and intentional infliction of emotional distress. He also asked for an accounting of the proceeds netted during the 1986-88 seasons. The two Anchorage cases were consolidated in August 1991. The three fish processors settled with Anthony for $55,000, leaving Leonard and Anthony as the sole litigants.
The California court refused to grant Leonard the injunctive relief he sought, reasoning that it would be inappropriate for an equity court to facilitate that which was prohibited under Alaskan law. The court instructed Leonard to pursue his legal remedies in Alaska.
In the Alaska litigation, Anthony moved for summary judgment on the grounds that the California decision was res judicata on Leonard's claims and that the parties' illegal agreement precluded Leonard from recovering the permit. The superior court granted summary judgment on both grounds. Leonard filed a petition for review. We reversed, holding that the California court's decision was not res judicata on Leonard's Alaska lawsuit. Alaska Supreme Court Order (February 25, 1992). We directed the superior court to consider the factors enunciated in Brown v. Baker 688 P.2d 943, 948 (Alaska 1984), to determine whether the unlawful agreement was enforceable. Id. The superior court thereafter discussed the Brown v. Baker factors and again dismissed Leonard's complaint.
The case then proceeded to trial to resolve Anthony's counterclaims. A jury returned *1231 a verdict in Leonard's favor on Anthony's malicious prosecution and emotional distress counterclaims. On the accounting claim, the superior court first determined that for the years 1986-88 there were $82,111.35 in net proceeds available for distribution. The court then examined the equities of the case and concluded that Anthony was entitled to half of the proceeds, or $41,055.68. However, because Anthony had received $55,000 in his settlement with the three Bristol Bay fisheries, the court awarded him nothing on his accounting claim.
The parties filed cross-motions for costs and attorney's fees. The clerk awarded $5,150 in costs to Leonard and $5,854 in costs to Anthony. The superior court found the case was a "wash" since Leonard lost his claim for return of the permit and Anthony did not prevail on his malicious prosecution and emotional distress counterclaims. The court held that neither party prevailed and, therefore, each should bear his own costs and attorney's fees.
Leonard appeals the superior court's judgment dismissing his claim for the return of the permit and the superior court's cost and attorney's fees order.

II. DISCUSSION

A. The Permit Retransfer Agreement
Leonard is asking this court to enforce an illegal agreement. Generally, courts leave parties to an illegal bargain where they find them and will grant no remedy to either party. See, e.g., Cosmopolitan Fin. Corp. v. Runnels, 2 Haw. App. 33, 625 P.2d 390, 397 (1981). We have no power, either in law or in equity, to enforce an agreement which directly contravenes a legislative enactment. See, e.g., Hemmen v. State, 710 P.2d 1001, 1003 (Alaska 1985). This rather self-evident principle has been incorporated into the Restatement (Second) of Contracts § 178(1) (1981) which reads:
A promise or other term of an agreement is unenforceable on grounds of public policy if legislation provides that it is unenforceable or the interest in its enforcement is clearly outweighed in the circumstances by a public policy against the enforcement of such terms.
(Emphasis added). Subsection 2 of section 178 describes those factors which should be considered in weighing the interest for enforcing a contract. These include the parties' justified expectations, any forfeiture that would result if the term were not enforced, and whether there is any special public interest in enforcing the term. Restatement (Second) of Contracts § 178(2) (1981). Finally, section 178(3) lists the factors which should be taken into account when weighing a public policy against enforcement.[2] Importantly, the "weighing of interests" in subsections (2) and (3) only occurs if there is no legislation specifically prohibiting enforcement of the promise or contractual term. If there is, then the disputed term will always be unenforceable. No weighing of interests is necessary.
This last point, illustrated by the Restatement's use of the disjunctive "or," is further supported by the commentary to section 178. Comment a reads:
Occasionally, on grounds of public policy, legislation provides that specified kinds of promises or other terms are unenforceable. Whether such legislation is valid and applicable to the particular term in dispute is beyond the scope of *1232 this Restatement. Assuming that it is, the court is bound to carry out the legislative mandate with respect to the enforceability of the term.

Restatement (Second) of Contracts § 178, cmt. a (emphasis added). The Restatement illustrates this rule with an example:
A borrows $10,000 from the B Bank, promising to repay it with interest at the rate of twelve per cent. A state statute that fixes the maximum legal rate of interest on such loans at ten per cent provides that a promise to pay a greater sum is "void" as usurious as to all the promised interest but not as to the principal. A's promise to pay the interest is unenforceable on grounds of public policy. The rule stated in § 184(2) [regarding severability of the illegal portion of an agreement] does not make A's promise to pay interest enforceable up to ten per cent because the legislation provides otherwise.
Id. Illus. 3. A's promise is unenforceable not because the "weighing of interests" so dictates, but because a state statute prohibits such a promise.
This is precisely the kind of fact pattern presented in the case before us now. The parties' oral agreement to retransfer the Conte permit directly contravened AS 16.43.150(g)(2). Thus, the promise is unenforceable because legislation so provides. We need to extend our analysis no further.
The detailed "weighing of interests" analysis found in the Restatement is designed for those cases where there is no legislation directly on point. Comment b to section 178 recognizes this:
Only infrequently does legislation, on grounds of public policy, provide that a term is unenforceable. When a court reaches that conclusion, it usually does so on the basis of a public policy derived either from its own perception of the need to protect some aspect of the public welfare or from legislation that is relevant to that policy although it says nothing explicitly about unenforceability.
Id. cmt. b. When the court is divining public policy and weighing interests, then it is able to enforce an agreement which may contravene such public policy if the factors described in section 178 favor enforcement. As the following Restatement example illustrates, this rule is usually reserved for cases where the public policy contravened is tangential to the core of the parties' agreement.
A and B make an agreement for the sale of goods for $10,000, in which A promises to deliver the goods in his own truck at a designated time and place. A municipal parking ordinance makes unloading of a truck at that time and place an offense punishable by a fine of up to $50. A delivers the goods to B as provided. Because the public policy manifested by the ordinance is not sufficiently substantial to outweigh the interest in the enforcement of B's promise, enforcement of his promise is not precluded on grounds of public policy.
Id. Illus. 4. Our ruling today does not prevent future litigants from arguing that a contract term should be enforced when the public policy is ambiguous, or when a statutory violation is peripheral to the real substance of the parties' agreement. In such an instance we will apply the factors listed in subsections 2 and 3 of section 178 to determine whether the term should be enforced. However, when legislation explicitly states that a particular type of promise is unenforceable, then the party seeking to enforce the promise will have no judicial recourse. We will not enforce a promise which the legislature has explicitly declared unenforceable.[3]
*1233 To the contrary, we think Leonard's and Anthony's conduct serious enough that we are referring this case to the District Attorney's Office for investigation, and possible prosecution, for perjury. We are also referring the case to the CFEC, to allow it to consider whether the Conte permit, currently in Anthony's possession, should be revoked under AS 16.43.960(a) ("The commission may revoke, suspend, or transfer all entry or interim-use permits held by a person who knowingly provides or assists in providing false information, or fails to correct false information provided to the commission for the purpose of obtaining a benefit for self or another, including the issuance, renewal, duplication, or transfer of an entry or interim-use permit or vessel license.").

B. Attorney's Fees and Costs
The award of costs under Civil Rule 79 is committed to the broad discretion of the trial court. Kaps Transport, Inc. v. Henry, 572 P.2d 72, 77 (Alaska 1977). The superior court is also given broad discretion when designating the prevailing party for the purposes of awarding attorney's fees under Civil Rule 82. Apex Control Systems, Inc. v. Alaska Mechanical Inc., 776 P.2d 310, 314 (Alaska 1989). This discretion is broad enough to warrant denial of fees altogether. Oaksmith v. Brusich, 774 P.2d 191, 202 (Alaska 1989). We find no abuse of discretion in the superior court declaring the case a "wash" and ordering each party to bear his own costs and fees.
AFFIRMED.
NOTES
[1]  A retransfer agreement violates AS 16.43.150(g)(2) ("[A]n entry permit may not be ... transferred with any retained right of repossession or foreclosure, or on any condition requiring a subsequent transfer.").
[2]  Restatement (Second) of Contracts § 178(3) (1981) reads:

In weighing a public policy against enforcement of a term, account is taken of
(a) the strength of that policy as manifested by legislation or judicial decisions,
(b) the likelihood that a refusal to enforce the term will further that policy,
(c) the seriousness of any misconduct involved and the extent to which it was deliberate, and
(d) the directness of the connection between that misconduct and the term.
[3]  In Brown v. Baker, we refused to enforce a security agreement in which purchasers of a vessel agreed to return a limited entry permit if they defaulted on their note. Brown v. Baker, 688 P.2d at 948. After noting that the rule against permit retransfer agreements was designed to prevent the economic coercion of fishermen, we concluded, "because the security agreement contravenes and defeats the purpose of the statute [prohibiting retransfer agreements] and because we see no special public interest in enforcing the illegal agreement, this portion of the original sales agreement is unenforceable." Id. Earlier in Brown, we cited the general rule that promises are unenforceable if legislation so provides. Id. at 947 (quoting Jackson Purchase, Etc. v. Local Union 816, 646 F.2d 264, 267 (6th Cir.1981)). While we reached the correct result in Brown, we did so with excess effort. Our cursory application of the section 178 factors was unnecessary in light of the general rule prohibiting enforcement of agreements the legislature has declared unenforceable.
