64 F.3d 659
NOTICE: Fourth Circuit Local Rule 36(c) states that citation of unpublished dispositions is disfavored except for establishing res judicata, estoppel, or the law of the case and requires service of copies of cited unpublished dispositions of the Fourth Circuit.Edgar S. SKINNER;  Ann J. Skinner;  Arena Sports,Incorporated, Plaintiffs-Appellants,v.FIRST AMERICAN BANK OF VIRGINIA, Defendant-Appellee.
No. 93-2493.
United States Court of Appeals, Fourth Circuit.
Argued:  May 3, 1995.Decided:  August 28, 1995.

ARGUED:  Gary Michael Bowman, Roanoke, VA, for Appellants.  Earle Duncan Getchell, Jr., MCGUIRE, WOODS, BATTLE & BOOTHE, Richmond, VA, for Appellee.  ON BRIEF:  Robert L. Hodges, Jonathan M. Fine, MCGUIRE, WOODS, BATTLE & BOOTHE, Richmond, VA, for Appellee.
Before MICHAEL and MOTZ, Circuit Judges, and YOUNG.
PER CURIAM:

OPINION

1
Edgar and Ann Skinner appeal the district court's denial of their motions (1) to amend their complaint to delete several claims, including their sole federal claim, and (2) to remand their case to state court.  Finding no error, we affirm.

I.

2
First American Bank of Virginia agreed to provide financing to Edgar and Ann Skinner for the construction of an indoor recreation facility.  The project later became insolvent, and First American threatened to foreclose on a deed of trust securing the Skinners' loan.  The Skinners filed a motion for judgment in Virginia state court alleging that First American failed to provide the financing as it had promised.  The motion contained a number of state contract and tort claims and one claim alleging violation of a federal statute, the Bank Holding Company Act, 12 U.S.C. Sec. 1972.  First American removed the case to the United States District Court for the Western District of Virginia on the grounds that the Bank Holding Company Act claim created federal question jurisdiction.  In its responsive pleading, First American answered the Skinners' complaint and asserted a counterclaim against the Skinners seeking judicial foreclosure on the property securing the loan.


3
The district court's scheduling order set a discovery cut-off of August 20, 1993, and a deadline for the filing of dispositive motions of September 10, 1993.  On September 3, 1993, after discovery had been completed and just one week before the deadline for dispositive motions, the Skinners moved to amend their complaint to drop their federal claim and several state claims.  At the same time, they moved to remand the case to state court on the grounds that no source of federal jurisdiction remained.  The court held a hearing on the motions on September 7, 1993, and took the motions under advisement.  On September 10, 1993, First American moved for summary judgment on all counts.  In a single order the district court denied the Skinners' motions to amend and remand and granted First American's motion for summary judgment.

II.

4
The Skinners allege two errors on appeal.  First, they claim that the district court erred by denying their motion to amend their complaint to remove their one federal claim.  Second, assuming that the amendment to the complaint should have been allowed, they claim that the district court erred in failing to remand on the grounds that no source of federal jurisdiction remained once the federal claim was dropped.  We conclude that the district court did not err in denying the Skinners' motion to amend.  The motion to remand was therefore properly denied.


5
Fed.R.Civ.P. 15(a) provides that, after the opposing party has served a responsive pleading, a party may amend its complaint only by leave of court.  Whether to allow an amendment"rests within the sound discretion of the district court."  Medigen, Inc. v. Public Serv.  Comm'n., 985 F.2d 164, 167 (4th Cir.1993).  Accordingly, we review the district court's denial of leave to amend for abuse of discretion.  Id. at 168.


6
As a threshold issue, the parties disagree about whether the district court's exercise of discretion regarding the Skinners' motion to amend should have been governed by the standards applicable to Rule 41(a)(2) (voluntary dismissal) or Rule 15(a) (amendment).1  The effect of the Skinners' amendment would have been to dismiss some, but not all, of their claims.  Because Rule 41 provides for the dismissal of actions, rather than claims, Rule 15 is technically the proper vehicle to accomplish a partial dismissal.  Ethridge v. Harbor House Restaurant, 861 F.2d 1389, 1392 (9th Cir.1988);  Gronholz v. Sears, Roebuck & Co., 836 F.2d 515, 517-18 (Fed.Cir.1987);  5 J. Moore, J. Lucas & J. Wicker, Moore's Federal Practice p 41.06-1, at 41-92 to -93 (1995) ("Moore's").  However, similar standards govern the exercise of discretion under either rule.  Mechmetals Corp. v. Telex Computer Prods., Inc., 709 F.2d 1287, 1294 (1983);  Moore's at 41-92 ("Since the structure of the two rules is similar, and since the district court's discretion is involved when leave of court is required, whether plaintiff's motion is made under Rule 15 or under Rule 41(a)(2), the choice of rules is largely a formal matter.").  We therefore analyze the Skinners' claim in light of cases applying both rules.


7
Rule 15(a) provides that "leave [to amend] shall be freely given when justice so requires."   However, leave to amend is not to be granted automatically, and the decision whether to do so rests within the sound discretion of the district court.  Deasy v. Hill, 833 F.2d 38, 40 (4th Cir.1987), cert. denied, 485 U.S. 977 (1988);  see National Bank of Washington v. Pearson, 863 F.2d 322, 327 (4th Cir.1988).  A district court may properly deny leave in light of undue delay, bad faith, or prejudice to the opposing party.  Deasy, 833 F.2d at 40;  Pearson, 863 F.2d at 327-28.  In particular, the court may take into account the stage of the proceedings when deciding whether to grant leave.  See Deasy, 833 F.2d at 41 (leave to amend properly denied when motion to amend came right before trial and after discovery was complete).


8
A motion to dismiss under Rule 41(a)(2) also lies within the district court's discretion.  Davis v. USX Corp, 819 F.2d 1270, 1273 (4th Cir.1987).  In considering a motion for voluntary dismissal, a district court must focus primarily on protecting the interests of the defendant, and the court may deny the motion if the defendant would be unfairly prejudiced.  Id.;  see Andes v. Versant Corp., 788 F.2d 1033, 1036 (4th Cir.1986).  The expenses of discovery and preparation of a motion for summary judgment may constitute prejudice sufficient to support denial of a voluntary dismissal.  Andes, 788 F.2d at 1036-37.  Accordingly, we have noted that "denial of voluntary dismissal is appropriate where summary judgment is imminent."  Davis, 819 F.2d at 1274 (citing Pace v. Southern Express Agency, 409 F.2d 331, 334 (7th Cir.1969));  see also id. at 1277 (voluntary dismissal without prejudice improper with respect to claims "faced with imminent adverse determination in a federal action.")  (Phillips, J. dissenting);2  Armstrong v. Frostie Co., 453 F.2d 914, 916 (4th Cir.1971) (dismissal under 41(a)(2) would have been properly denied where defendant had already moved for summary judgment).


9
We believe that, in light of our cases applying Rules 15(a) and 41(a)(2), the district court did not abuse its discretion in denying the Skinners' motion to amend.  The motion was made after discovery had been completed and when the case was ripe for summary judgment.  Davis, 819 F.2d at 1274;  Deasy, 833 F.2d at 41.  If the motion to amend had been granted, First American would have been prejudiced because it had already incurred significant time and expense in discovery and in preparation for a summary judgment motion.  Andes, 788 F.2d 1033.  While we acknowledge that extensive discovery is not prejudicial when the results of discovery may be used in a subsequent action, Davis, 819 F.2d at 1276, here a large part of the First American's discovery would likely have been unusable on a motion for summary judgment in state court.  First American's discovery included ten depositions, and Virginia rules of practice prohibit the use of depositions to support a summary judgment motion absent agreement of the parties.  Va. Sup.Ct. R. 3:18 (1995).  On the other hand, the only apparent effect of the amendment on the Skinners would have been to permit them to dismiss their federal claim and thereby avoid an adverse ruling in federal court.  We do not believe that this is the type of circumstance in which the grant of leave to amend was required.  See Marex Titanic, Inc. v. Wrecked and Abandoned Vessel, 2 F.3d 544, 547 (4th Cir.1993) (questioning wisdom of "allowing party ... to dismiss a case in order to avoid an unfavorable decision on the merits").  Accordingly, the district court's denial of the Skinners' motion to amend was not an abuse of discretion.  And, because the district court properly retained the federal claim, it did not err in denying the Skinners' motion to remand.

III.

10
For the above reasons, we affirm the order of the district court.

AFFIRMED


1
 Rule 41(a)(2) provides that after the opposing party has served an answer, "an action shall not be dismissed at the plaintiff's instance save upon order of the court and upon such terms and conditions as the court deems proper."   Rule 15(a) provides that after a responsive pleading has been served "a party may amend the party's pleading only by leave of court or by written consent of the opposing party."


2
 Judge Phillips explained the reasoning behind this principle as follows:
[I]t is unfair to a defendant to let a claimant select a forum in which to prosecute her claims, then be allowed to bail out scotfree to try the same claims in another forum after losing on the merits or seeing the adverse handwriting on the wall in the first chosen forum.
Id. at 1277 (Phillips, J. dissenting).


