
658 F.3d 948 (2011)
CHEVRON U.S.A. INC., Plaintiff-Appellee,
v.
M & M PETROLEUM SERVICES, INC., a corporation, Defendant-Appellant.
Chevron U.S.A. Inc., a corporation; Chevron Products Company, FKA ChevronTexaco Products Company, a division of Chevron U.S.A., Inc., Plaintiffs-counter-defendants-Appellees,
v.
M & M Petroleum Services, Inc., a corporation; Mansoor Ghaneeian, Defendants-counter-claimants-Appellants.
Nos. 09-56427, 09-56686.
United States Court of Appeals, Ninth Circuit.
Submitted September 2, 2011.[*]
Filed September 12, 2011.
*949 Murray Robertson, Law Offices of Murray Robertson, APC, Tustin, CA, for the appellant.
Robert C. Phelps, Glynn & Finley, LLP, Walnut Creek, CA, for the appellee.
Before: ARTHUR L. ALARCÓN, DIARMUID F. O'SCANNLAIN, and BARRY G. SILVERMAN, Circuit Judges.

OPINION
SILVERMAN, Circuit Judge:
As a general rule, only a franchisee may recover attorney fees under the Petroleum Marketing Practices Act. However, 15 U.S.C. § 2805(d)(3) authorizes a district court to award attorneys' fees to a franchisoragainst a franchiseeif the franchisee is found to have brought a frivolous PMPA action. In this case, Chevron U.S.A., the franchisor, brought suit for declaratory judgment against one of its franchised dealers, M & M Petroleum Services, Inc. M & M responded with a counterclaim of its own, a counterclaim that was not only found to be frivolous, but the product of perjury and other misconduct. We hold that had M & M merely defended Chevron's suit, it could not have been held liable for attorneys' fees. However, in affirmatively bringing a counterclaim that was reasonably found to be frivolous, M & M opened itself up to liability for attorneys' fees.


Factual Background[1]
Chevron U.S.A. sells gasoline to consumers through Chevron-branded retail service stations. Some Chevron-branded retail service stations are owned and operated by Chevron and others are owned and/or operated by independent dealers that enter into franchise agreements to sell Chevron branded-gasoline under the Chevron brand. M & M Petroleum is an independent dealer that operated a Chevron-brand service station in Newport Beach, California under franchising agreements with Chevron. Mansoor Ghaneeian is a fifty percent shareholder in M & M and M & M's designated dealer of record. M & M's Newport Beach station has become increasingly profitable under Ghaneeian's operation.
Until July 2005, M & M paid a fixed monthly rent to Chevron. Starting in July 2005, M & M agreed to pay Chevron the greater of either the fixed monthly rent or a percentage of its reported daily sales. In May 2007, Chevron audited M & M's books and records to determine whether M & M had paid all rent due under its franchise agreements. M & M's bookkeeper *950 at the time, Afsaneh Ehsani, told Chevron's auditor that M & M maintained a second set of financial records that accurately reflected actual sales. M & M did not produce to Chevron's auditors this second set of records, which included calculations of unreported revenue and cash payments to M & M's employees, Ghaneeian, and Ghaneeian's family. Based on the documents that he was able to review, Chevron's auditor reported discrepancies between M & M's actual sales and the amounts reported by M & M to Chevron and to California and federal taxing authorities. Treating this as a breach of the dealer agreements and grounds for termination of the agreements under the PMPA, Chevron brought a declaratory judgment action against M & M.
Chevron sought a declaration from the district court that Chevron's termination of M & M's franchise was in accordance with the franchise agreements and the PMPA. M & M responded by filing a counterclaim that is "essentially the mirror image of Chevron's claim for declaratory relief," alleging that Chevron's attempt to terminate M & M's franchise did not comply with the PMPA. After a six-day bench trial, the district court issued Findings of Fact and Conclusions of Law. The district court ruled that Chevron's termination of M & M's franchise was proper under 15 U.S.C. § 2802(b)(2)(A) and (C). The district court found, inter alia, that M & M failed fully and accurately to report its sales to Chevron, created "secret" books and records as part of efforts to knowingly and intentionally misrepresent income to Chevron, failed to maintain required records, failed to provide documents required for audits, and lied about the existence of the "secret" books and recordseach grounds justifying Chevron's termination of the Dealer Agreements. The district court also found M & M's pretext argument (i.e. that Chevron was merely using this litigation to gain the station at issue for free) as well as M & M's counterclaim that Chevron violated the PMPA by terminating the Dealer Agreements wholly without merit. In so finding, the district court noted that it was "gravely concerned about Chevron's general practice of attempting to reacquire [independently operated] stations." Nonetheless, the court emphasized that
evidence was not presented that proves that Chevron brought the instant lawsuit merely as a pretext for acquiring the station for free.... [C]onsiderable evidence has been presented to this Court that Ghaneeian engaged in heinous practices, such as likely underreporting the Station's revenue to both the state and federal government, as well as Chevron itself. Ghaneeian's practices have harmed Chevron financially and, if Ghaneeian is allowed to continue to operate the Station, hold the potential to significantly harm Chevron's reputation as they will constitute a validation of Ghaneeian's deception and dishonesty. It is on that basis that Chevron brought the instant lawsuit.
Chevron then brought a motion for attorneys' fees and costs. The district court reversed its earlier ruling that Chevron could recover fees as a matter of contract under a provision of an agreement with M & M; the court held that the PMPA attorneys' fees provision, 15 U.S.C. § 2805(d), preempts the attorneys' fees provision of the agreement. The district court then considered whether Chevron, the franchisor, nevertheless could recover attorneys' fees from M & M, the franchisee, under section 2805(d)(3), which provides that "the court may, in its discretion, direct that reasonable attorney and expert witness fees be paid by the franchisee if the court finds that [an action brought by the franchisee pursuant to section 2805(a)] is frivolous."
The district court acknowledged that the PMPA "contemplates suits in which the *951 franchisee instigates a frivolous lawsuit against the franchisor by alleging the franchisor has violated the PMPA," but ruled that franchisors should still be able to recover attorneys' fees "in [the] rare circumstances [that] a franchisor, in response to a franchisee that maintains a frivolous position with respect to the termination of the parties' agreement, [has] to resort to the courts in order to effectuate the termination." The district court held that M & M's pretext argument and counterclaim were not merely "meritless," as the court stated in its Findings of Fact and Conclusions of Law, but "frivolous" within the meaning of 15 U.S.C. § 2805(d)(3). The district court specifically noted that "M & M had not introduced any evidence that would support a claim that the termination was pretextual" and that "the case presented clear-cut and overwhelming grounds for terminating the Dealer Agreements under pursuant to [the PMPA], and [M & M] did not raise any difficult issues of statutory interpretation." Furthermore, the district court found that M & M and Ghaneeian's "repeated and systemic acts of fraud and wrongdoing, including spoliation of evidence and perjury" weighed in favor of awarding attorneys' fees to Chevron.

Jurisdiction
The district court exercised jurisdiction over Chevron's action seeking a declaration that it complied with the PMPA in terminating its agreements with M & M under 28 U.S.C. §§ 1331, 2201 and 2202. The district court's exercise of federal question jurisdiction was proper because a significant question of federal law under the PMPA would have been presented had M & M initiated the suit. See Standard Ins. Co. v. Saklad, 127 F.3d 1179, 1181 (9th Cir.1997) ("A person may seek declaratory relief in federal court if the one against whom he brings his action could have asserted his own rights there."); see also Franchise Tax Bd. v. Constr. Laborers Vacation Trust, 463 U.S. 1, 19, 103 S.Ct. 2841, 77 L.Ed.2d 420 (1983) ("Federal courts have regularly taken original jurisdiction over declaratory judgment suits in which, if the declaratory judgment defendant brought a coercive action to enforce its rights, that suit would necessarily present a federal question.")

Standard of Review
We review de novo the district court's interpretation of 15 U.S.C. § 2805 to allow for awards of attorneys' fees to franchisors as well as franchisees. See Mustang Mktg., Inc. v. Chevron Prods. Co., 406 F.3d 600, 606 (9th Cir.2005). "A grant or denial of attorney's fees under the PMPA is reviewed for abuse of discretion." Rawoof v. Texor Petroleum Co., 521 F.3d 750, 760 (7th Cir.2008) (citing Four Corners Serv. Station, Inc. v. Mobil Oil Corp., 51 F.3d 306, 315 (1st Cir.1995)).

Discussion

I. The District Court Did Not Err in Ruling That 15 U.S.C. § 2805(d) Allows for an Award of Attorneys' Fees to a Franchisor When a Franchisee Files a Frivolous Counterclaim.
M & M contends that the district court erred in ruling that the PMPA allows Chevron to recover attorneys' fees from M & M because, it argues, that 15 U.S.C. § 2805(d) does not allow franchisors to recover attorneys' fees unless the franchisee files a frivolous initial complaint. M & M's argument fails because its counterclaim is no less a "civil action" within the meaning of section 2805(a) than the initial complaint and filing a frivolous action (whether complaint or counterclaim) under 2805(a) opens M & M up to liability for attorneys' fees under section 2805(d)(3).
*952 In the absence of a frivolous complaint or counterclaim brought by a franchisee under 15 U.S.C. § 2805(a) alleging a violation of the PMPA by a franchisor, a court may not award attorneys' fees to a franchisor under the PMPA. See Interstate Petroleum Corp. v. Morgan, 249 F.3d 215, 219-220 (4th Cir.2001) (en banc). Thus, if M & M had not brought a counterclaim against Chevron, our analysis would end there because M & M's pretext defense to Chevron's claim, even if frivolous, does not qualify as a civil action in and of itself. See Merchants' Heat & Light Co. v. James B. Clow & Sons, 204 U.S. 286, 289-90, 27 S.Ct. 285, 51 L.Ed. 488 (1907) (distinguishing a defense from a counterclaim).
However, M & M did bring a counterclaim alleging that Chevron's attempt to terminate M & M's franchise was not in compliance with the requirements of 15 U.S.C. § 2802. The key question then is whether M & M's counterclaim qualifies as a civil action within the ambit of the PMPA. See 15 U.S.C. § 2805(a) (providing that a franchisee may bring a "civil action" against a franchisor for violations of section 2802). It does. A counterclaim is "in effect, a new suit, in which [M & M] was plaintiff and [Chevron] was defendant." Roberts Min. & Mill. Co. v. Schrader, 95 F.2d 522, 524 (9th Cir.1938) (citing Merchants' Heat & Light Co., 204 U.S. at 289, 27 S.Ct. 285). That the proceedings were initiated by Chevron's complaint and M & M's counterclaim encompassed the exact same subject matter as the initial complaint is of no moment because "the defendant, if he elects to sue upon his claim in the action against him, assumes the position of an actor and must take the consequences." Merchants' Heat & Light Co., 204 U.S. at 290, 27 S.Ct. 285. Not content to simply defend against Chevron's declaratory judgment suit, M & M chose to assert a counterclaim of its own and caused Chevron to defend it. Therefore, by filing its counterclaim, M & M, a franchisee, maintained a civil action against Chevron, a franchisor, within the meaning of 15 U.S.C. § 2805(a), and opened itself up to liability for attorneys' fees under 15 U.S.C. § 2805(d)(3) in the event the counterclaim proved frivolous.

II. The District Court Did Not Abuse Its Discretion in Ruling That M & M's Counterclaim Was Frivolous.
The term "frivolous" characterizes an action "that is both baseless and made without a reasonable and competent inquiry." Townsend v. Holman Consulting Corp., 929 F.2d 1358, 1362 (9th Cir.1990) (en banc). "A frivolous case is one that is groundless ... with little prospect of success; often brought to embarrass or annoy the defendant." Rodriguez v. United States, 542 F.3d 704, 709 (9th Cir.2008) (alteration in original) (internal quotation marks omitted).
Overwhelming evidence supported the district judge's finding that M & M's counterclaim was frivolous. In addition to finding that M & M kept a "secret" set of books and records designed to hide revenue from Chevron and taxing authorities, the district court also found that Ghaneeian engaged in "willful and persistent misconduct" throughout the litigation, including perjury and spoliation of evidence. M & M does not challenge the district court's ruling that Ghaneeian perjured himself or that he was responsible for the spoliation of evidence. M & M contends that Ghaneeian's testimony supported its claim of pretext; however, perjured testimony simply cannot constitute a sufficient evidentiary basis to defeat a finding of frivolousness. Cf. Union Planters Bank v. L & J Dev. Co., 115 F.3d 378, 385-86 (6th Cir.1997) ("Consistent with the purposes behind Rule 11, we hold that litigants cannot avoid sanction under the rule simply by defeating summary judgment on the basis of *953 false evidence."). M & M also appears to contend that questions about the credibility of Ehsani, one of Chevron's key witnesses, supports a ruling that M & M's counterclaim was nonfrivolous; however, those doubts do not offer a meaningful factual basis for M & M's counterclaim, particularly in the face of overwhelming evidence regarding M & M's wrongdoing.
The subtraction of Ghaneeian's testimony and Ehsani's dubious credibility leaves M & M with only Chevron's past course of dealing. The district court acknowledged that evidence of Chevron's past conduct caused the court to "articulate[ ] a generalized concern for franchisor takeovers of franchisee operations and an increase in vertical monopolies." The district court correctly distinguished those generalized concerns from the facts motivating Chevron's present termination action, which is supported by detailed findings regarding M & M's practices of keeping two sets of books and records, under-reporting revenue to Chevron and taxing authorities, and refusing to turn over books and records to Chevron in accordance with its franchise agreements. Therefore, the district court did not abuse its discretion in determining that M & M's counterclaim was frivolous and awarding attorneys' fees to Chevron under 15 U.S.C. § 2805(d)(3).

Conclusion
The district court did not err in determining that Chevron was eligible to recover attorneys' fees under the PMPA based on M & M's counterclaim, nor did the district court abuse its discretion in determining that M & M's counterclaim was frivolous and awarding attorneys' fees to Chevron under 15 U.S.C. § 2805(d)(3).
AFFIRMED.
NOTES
[*]  The panel unanimously concludes this case is suitable for decision without oral argument. See Fed. R.App. P. 34(a)(2).
[1]  The factual background section is drawn from the district court's Findings of Fact and Conclusions of Law, which neither party has challenged.
