
    ROANOKE PROPERTIES LIMITED PARTNERSHIP, a North Carolina Limited Partnership, Plaintiff-Appellee, v. DEWBERRY & DAVIS, Defendant-Appellant, and Sidney O. Dewberry; John Stevenson; Dwight F. Stevenson; Ronald B. Smith, Defendants, v. Glenn Elliott Futrell, Incorporated; LRM Incorporated; Rogers-Bakers Properties, Incorporated; A. Glenn Barwick Properties, Incorporated; Eastern Carolina Land Development, Incorporated; Barry Martin Properties, Incorporated; Land Consultants of the South, Incorporated; Manteo Investment Associates, Incorporated, Third Party Defendants.
    No. 01-1659.
    United States Court of Appeals, Fourth Circuit.
    Argued Jan. 24, 2002.
    Decided Feb. 28, 2002.
    ARGUED: James F. Lee, Jr., Lee & McShane, P.C., Washington, D.C., for Appellant. John N. Hutson, Jr., Howard, Stallings, From & Hutson, P.A., Raleigh, North Carolina, for Appellee. ON BRIEF: Brandon M. Gladstone, Lee & McShane, P.C., Washington, D.C.; Evelyn M. Coman, Newsom, Graham, Hedrick & Kennon, P.A., Durham, North Carolina, for Appellant. Brian E. Moore, Howard, Stallings, From & Hutson, P.A., Raleigh, North Carolina, for Appellee.
    Before WILLIAMS and TRAXLER, Circuit Judges, and HALL, Senior Circuit Judge of the United States Court of Appeals for the Ninth Circuit, sitting by designation.
   OPINION

PER CURIAM.

Dewberry & Davis (Dewberry) appeals the district court’s order denying its motion for costs and attorneys’ fees. For the reasons set forth below, we affirm.

i.

This action arose from the collapse of a bulkhead at the Pirate’s Cove Marina in Dare County, North Carolina. Roanoke Properties General Partnership (the General Partnership) began developing Pirate’s Cove in the late 1980s. In 1988, the General Partnership contracted with Dewberry, a Virginia architectural and engineering firm, to design certain parts of the marina, including the bulkhead. The General Partnership subsequently conveyed the marina to Roanoke Properties Limited, a North Carolina corporation wholly owned by the General Partnership. After this conveyance, Roanoke Properties Limited Partnership (Roanoke), the Appellee, succeeded to the interests of the General Partnership.

In November 1992, a portion of the marina bulkhead collapsed. Roanoke brought suit against Dewberry in Dare County Superior Courts seeking damages for breach of contract and negligence. Dewberry subsequently removed the case to the United States District Court for the Eastern District of North Carolina pursuant to diversity jurisdiction. A jury trial commenced on June 3, 1996. The jury returned a special verdict in favor of Roanoke, finding that Dewberry had breached the contract, that Roanoke incurred property damage as a result of Dewberry’s negligence, and that Roanoke was entitled to damages in the amount of $840,585.63.

Dewberry filed a motion for judgment as a matter of law, or, alternatively, for a new trial. The district court granted the motion for judgment as a matter of law on the basis that Roanoke had offered insufficient evidence to show that it was the owner of the damaged property. Roanoke appealed to this court, and we affirmed the district court’s entry of judgment as a matter of law in favor of Dewberry. Roanoke Prop. Ltd. Partnership v. Dewberry, 201 F.3d 437, 1999 WL 1032605 (4th Cir.1999).

On May 30, 2000, Dewberry filed a motion for costs and attorneys’ fees, arguing that Roanoke’s predecessor in interest, the General Partnership, agreed under the contract with Dewberry to reimburse Dewberry for costs and reasonable attorneys’ fees incurred while defending claims arising under the contract for which Dewberry was the prevailing party. The contract provides in relevant part that “[t]he losing party shall pay the winning party’s reasonable attorneys’ fees and expenses for the prosecution or defense of any cause of action ... arising under this Agreement. ...” (J.A. at 67.) On April 11, 2001, the district court denied Dewberry’s motion for attorneys’ fees and costs, holding that Dewberry could not collect attorneys’ fees or costs under the contract because Dewberry had been found by the jury to have breached the contract. On May 14, 2001, Dewberry filed a notice of appeal to this court.

II.

A.

On appeal, Dewberry first contends that the district court’s denial of attorneys’ fees and costs violated Virginia law by failing to give effect to the provision for attorneys’ fees and costs in the parties’ contract. We generally review a district court’s decision awarding or denying attorneys’ fees and costs for abuse of discretion. Hitachi Credit America Corp. v. Signet Bank, 166 F.3d 614, 631 (4th Cir.1999). Insofar as the district court’s ruling was premised on a question of substantive contract law as opposed to an exercise of its discretion, however, we review the denial of attorneys’ fees and costs de novo. See, e.g., Smyth v. Rivero, 282 F.3d 268 (4th Cir.2002) (holding that, although we typically review award or denial of attorneys’ fees and costs for an abuse of discretion, where district court denies attorneys’ fees and costs based upon legal determination that a party is not a “prevailing party,” we review the determination de novo); Perry v. Bartlett, 231 F.3d 155, 163 (4th Cir.2000) (“If the district court denies a prevailing party’s motion for attorneys’ fees, we review such denial for abuse of discretion. However, if the district court determines, as a matter of law, that a party is not a prevailing party, we review the district court’s determination de novo.” (internal quotation marks omitted)).

Reviewing the record and the district court’s order de novo, we conclude that the district court did not violate the contract or Virginia law by denying Dewberry’s motion for attorneys’ fees and costs. Under Virginia law, “a party who commits the first breach of contract is not entitled to enforce the contract.” Horton v. Horton, 254 Va. 111, 487 S.E.2d 200, 203 (1997); see also Countryside Orthopaedics v. Peyton, 261 Va. 142, 541 S.E.2d 279, 285 (2001) (“[W]hen the first breaching party commits a material breach, that party cannot enforce the contract.”). We agree with the district court that Dewberry may not rely upon the contract that it materially breached to support an award of attorneys’ fees and costs.

B.

Dewberry next claims that, even assuming the district court’s denial of attorneys’ fees and costs under the contract was appropriate, the district court abused its discretion by denying its motion for costs pursuant to Federal Rule of Civil Procedure 54. Rule 54(d)(1), entitled “Costs Other than Attorneys’ Fees,” provides: “Except when express provision therefor is made either in a statute of the United States or in these rules, costs other than attorneys’ fees shall be allowed as of course to the prevailing party unless the court otherwise directs.” Fed.R.Civ.P. 54(d)(1). “[W]hile Rule 54(d)(1) intends the award of costs to the prevailing party as a matter of course, the district court is given discretion to deny the award, and we review such exercise of discretion for abuse.” Cherry v. Champion Int’l Corp., 186 F.3d 442, 446 (4th Cir.1999).

The district court held that it would be unjust to award costs to Dewberry under the unique facts of this ease, and we conclude that this determination was not an abuse of discretion. Thus, the district court’s denial of costs pursuant to Rule 54 does not constitute reversible error.

III.

Having had the benefit of oral argument and after reviewing the record, the district court’s order, and the parties’ submissions, we conclude that Dewberry has not presented any meritorious grounds justifying reversal of the district court’s order denying Dewberry’s motion for attorneys’ fees and costs. Accordingly, the district court’s judgment is affirmed.

AFFIRMED. 
      
      . These facts are taken from our opinion in Roanoke Prop. Ltd. Partnership v. Dewberry, 201 F.3d 437, 1999 WL 1032605 (4th Cir. 1999).
     
      
      . The district court acknowledged that it granted judgment as a matter of law in favor of Dewberry, but it stated that judgment as a matter of law had been appropriate only because Roanoke had failed to establish that it owned the damaged property. Thus, the district court ruled that "the Court’s purely legal conclusion did not alter the fact that Defendant’s breach had been determined by the jury.” (J.A. at 925.)
     
      
      . There is some dispute as to whether this claim is governed by Virginia or North Carolina law, with Dewberry contending that Virginia law applies. Because we cannot discern any difference between the two states’ laws that would affect our resolution of this claim, we assume, without deciding, that Virginia law is applicable.
     