
572 F.3d 697 (2009)
Abdul Masih KARDOH, Plaintiff-Appellee,
v.
UNITED STATES of America, Defendant-Appellant.
No. 07-15700.
United States Court of Appeals, Ninth Circuit.
Argued and Submitted October 24, 2008.
Filed July 10, 2009.
*698 Joseph P. Russoniello, U.S. Attorney, Barbara J. Valliere, Hartley M.K. West (argued), and Stephanie M. Hinds, Assistant U.S. Attorneys, San Francisco, CA, for defendant-appellant United States.
Erik Babcock (argued), Oakland, CA, and Jonathan M. Kaufman, San Francisco, CA, for plaintiff-appellee Abdul Masih Kardoh.
Before PROCTER HUG, JR., GLENN L. ARCHER[*], and RICHARD R. CLIFTON, Circuit Judges.
CLIFTON, Circuit Judge:
Abdul Masih Kardoh, a Syrian national, obtained four alien registration cards bearing names of persons not entitled to enter the United States from an undercover agent posing as a corrupt immigration official, to whom Kardoh paid $40,000 in exchange. A few minutes after the transaction, Kardoh was arrested, still carrying the four cards. The government did not prosecute Kardoh, but he was deported two months later. Kardoh then sought to recover the $40,000. After the government declined to return the money voluntarily, Kardoh filed a motion for return of property under Federal Rule of Criminal Procedure 41(g). The district court concluded that the government could not retain the money and granted Kardoh's motion for return of property. Concluding that Kardoh's claim is subject to the doctrine known as in pari delicto, we reverse.


*699 I. Background
Kardoh became the subject of an investigation by Department of Homeland Security, Immigration and Customs Enforcement ("ICE") in July 2004. At that time, Kardoh was residing unlawfully in the U.S. on an expired tourist visa. ICE received information that he was seeking to acquire immigration documents. A few months later, he was introduced to an undercover ICE agent posing as a corrupt immigration official. Over the next fourteen months, on multiple occasions, Kardoh expressed to the undercover agent his desire to purchase alien registration cards to benefit himself and others. In separate transactions, Kardoh purchased from the agent a card with his name for $12,500 and a card for another Syrian national also living in the U.S. unlawfully on an expired tourist visa for $15,000.
Kardoh's last meeting with the undercover agent resulted in the transaction which is the subject of this appeal. It was described in a declaration by the undercover agent as follows:
On December 12, 2005, during my last meeting with Kardoh in my vehicle parked at the terminus of Clay Street in San Francisco, California, I provided Kardoh with four Alien Registration Cards bearing the identity of four Syrian nationals not legally entitled to the cards nor entitled to enter the United States. In exchange for the cards, Kardoh removed from his person and handed me four bundles of U.S. paper currency bound with rubber bands, shortly after which Kardoh exited my vehicle with the four Alien Registration Cards in his possession. Immediately thereafter, Kardoh was arrested and the four cards were found on his person. A subsequent count confirmed that the amount of money provided by Kardoh to me to be $40,000.
The declaration went on to state that the agent had on several occasions spoken with Kardoh about the illegality of the transaction and expressed the agent's conclusion that it was apparent that Kardoh "understood that the transactions were illegal." During an interview following his arrest, after signing a form which indicated that he understood his rights, Kardoh admitted knowing that the transaction was illegal. As expressed in the agent's declaration:
Kardoh admitted knowing what he did was illegal and to being told that it was illegal. Kardoh further admitted that his understanding of the fact that the cards were obtained "under the table" meant that they were obtained illegally, and that he could not deny the fact that what he did was "one-hundred percent (100%) wrong."
Kardoh offered no declaration of his own nor any other evidence to rebut the testimony contained in the agent's declaration.
Kardoh was deported from the United States two months after his arrest. He was never indicted, nor did the government ever initiate forfeiture proceedings.
By letter, Kardoh's attorney asked the government to return the $40,000 to him. The government declined to do so. After it became apparent that neither an indictment nor a return of the money was forthcoming, Kardoh filed a motion with the district court under Rule 41(g) of the Federal Rules of Criminal Procedure, seeking an order that the $40,000 be returned.[1]
*700 After conducting two hearings and receiving supplemental briefing, the district court concluded that it could properly exercise equitable jurisdiction over the motion and that the money should be returned to Kardoh:
The court therefore finds that continued retention of the $40,000 in the absence of a forfeiture proceeding, investigation or prosecution is unreasonable. The property was taken over a year ago. The government confiscated the money as an instrumentality of an illegal act without ever establishing the illegal act. No charges have been filed. The government has not provided evidence justifying a delay in filing charges. Finally, Kardoh has had no notice and no legal process for protecting his interest in the money. Accordingly, equitable principles mandate that the $40,000 be returned.
The government appealed.

II. Discussion
Where no criminal proceeding is pending, a district court has discretion to hear a motion for the return of property as a civil equitable proceeding. United States v. Kama, 394 F.3d 1236, 1238 (9th Cir.2005). Courts should exercise "caution and restraint" before assuming jurisdiction over such a motion and they must consider four specific factors to determine if jurisdiction is warranted. Id. (quoting Ramsden v. United States, 2 F.3d 322, 324 (9th Cir.1993)). One of those factors is whether "the movant has an individual interest in and need for the property he wants returned." Id. (quoting Ramsden, 2 F.3d at 325). If jurisdiction is warranted, a court considers whether the government's retention of the property would be reasonable under all of the circumstances. Ramsden, 2 F.3d at 326. In this case, whether Kardoh was entitled to the $40,000 is dispositive of both the jurisdictional and merits issues.
The government offered multiple arguments why Kardoh was not entitled to the money. We focus on one of them, that the doctrine of in pari delicto prevents Kardoh from obtaining the court's assistance in recovering money voluntarily paid in furtherance of an illegal contract. We agree.
"It has long been `the settled rule that property delivered under an illegal contract cannot be recovered back by any party in pari delicto.'" United States v. Farrell, 606 F.2d 1341, 1348 (D.C.Cir.1979) (quoting Harriman v. Northern Securities Co., 197 U.S. 244, 295, 25 S.Ct. 493, 49 L.Ed. 739 (1905)). The general rule, in its full Latin glory, is "in pari delicto potior est conditio defendentis," or "[i]n case of equal fault the condition of the party defending is the better one." Farrell, 606 F.2d at 1348 & n. 21. The D.C. Circuit restated the doctrine to be that "[n]either party to an illegal contract will be aided by the court, whether to enforce it or set it aside." Id. at 1348-49.
This principle was originally used in the context of criminal activity to bar the return of funds used in an attempt to bribe a public official. See Clark v. United States, 102 U.S. 322, 26 L.Ed. 181 (1880); United States v. Thomas, 75 F.2d 369 (5th Cir. 1935); United States v. Iovenelli, 403 F.2d 468 (7th Cir.1968). The in pari delicto doctrine has previously been recognized by our court in the bribery context. United States v. Wilson, 591 F.2d 546, 547-48 (9th Cir.1979).
*701 In Farrell, the D.C. Circuit extended the in pari delicto doctrine to other illegal transactions, concluding that $5,000 that had been paid to an undercover officer in an illegal transaction for heroin should not be returned to the claimant. 606 F.2d at 1350. Even though the government could not forfeit the money because at that time the forfeiture statute did not provide for the forfeiture of money paid in exchange for a controlled substance, the Farrell court held:
[I]t is contrary to public policy to permit the courts to be used by the wrongdoer Farrell to obtain the property he voluntarily surrendered as part of his attempt to violate the law. If as the cases hold it is sound public policy to deny the use of the courts to persons in pari delicto who seek the return of illegally paid money, a fortiori it is sound public policy to deny the aid of the courts to a single violator of the law who seeks the return of money paid to a government agent in an attempt to contract for the purchase of contraband drugs.
Id. The Eighth and Third Circuits have since followed Farrell in applying the in pari delicto doctrine to prevent the return of money voluntarily paid to a government agent in an illegal transaction. United States v. Smith, 659 F.2d 97, 100 (8th Cir.1981) (applying the in pari delicto rule to prevent the return of $25,000 which the claimant gave to an undercover agent in an attempt to purchase hashish); Mantilla v. United States, 302 F.3d 182, 186-87 (3d Cir.2002) (applying the doctrine to decline the return of $900,000 which the claimant paid in an undercover narcotics transaction).
Like the claimants in these cases, Kardoh paid the money at issue here in furtherance of an illegal scheme. Kardoh gave the $40,000 to the undercover ICE agent in exchange for the forged alien registration cards. Indeed, it might fairly be questioned whether the $40,000 was "seized" by the government at all or whether Kardoh has been "deprived" of the $40,000, apparent requirements under the terms of Rule 41(g) for that rule to apply. When Kardoh was arrested, he did not have that money in his possession, since he had already paid it over to the undercover agent in exchange for the registration cards. Not surprisingly, he does not seek to recover the cards which he did have in his possession when he was arrested. Those forged cards were seized from him and retained by the government, but to request their return would highlight the absurdity of the request. We conclude, in any event, that ordering the government to return the $40,000 to Kardoh would be contrary to public policy for the reasons expressed in Farrell.
The district court recognized the in pari delicto doctrine but concluded that it should not apply here because Kardoh was never convicted of a criminal offense. The court's order explained that "[a]djudicating Kardoh's guilt on the basis of this record, where Kardoh has had no opportunity to conduct discovery and has not conceded any wrongdoing, is inconsistent with Kardoh's due process rights." We do not agree.
A conviction has not historically been required to establish the illegality of a transaction. There is no mention of a criminal conviction in the Supreme Court's 1880 decision in Clark. Similarly, a conviction was specifically held not to be necessary by the Fifth Circuit in Thomas. Thomas was arrested for the unlawful possession and transportation of intoxicating liquor and the attempted bribery of a customs officer. 75 F.2d at 370. While Thomas pled guilty to the unlawful possession of liquor, he was never prosecuted for bribery. After the statute of limitation had expired, Thomas sought the return of *702 the $1,000, arguing that he was the lawful owner and he was entitled to the money because of the presumption that he was innocent of the bribery charge. The Fifth Circuit held to the contrary:
Thomas cannot avoid [presenting evidence that he was innocent of bribery] by relying on the presumption of innocence and alleging merely that the money was received from him and retained by the customs officers; for that is an allegation which is entirely consistent with bribery. In order to recover [the bribe money] he is required by statute to make full proof of his right to the money deposited in the Treasury, and this he cannot do without showing that he is innocent of the charge of bribery. If he was guilty of bribery, he could not have recovered the bribe money back from the customs officers, and has no better claim against the United States.
Id. at 370-71.
It is to be expected that in most cases of this kind the government will undertake criminal prosecutions or forfeiture proceedings, but the failure to do so does not automatically mean that a claimant's motion for return of property must be granted. There is no basis to conclude that the government acted here in bad faith. If there were, that would be a factor to consider in whether the court should exercise jurisdiction over or grant the claimant's motion. That the government elected to deport Kardoh rather than to prosecute him did not make his payment to the undercover agent any more innocent, however, nor did it deprive him of due process.
The question of the illegality of Kardoh's payment was properly before the district court. Because there were no criminal proceedings pending, the motion should have been treated as a civil complaint governed by the Federal Rules of Civil Procedure. United States v. Ibrahim, 522 F.3d 1003, 1007 (9th Cir.2008); United States v. Ritchie, 342 F.3d 903, 906-07 (9th Cir.2003). The government's opposition to Kardoh's motion was the equivalent of a motion for summary judgment under Rule 56 of the Federal Rules of Civil Procedure, as to which the court should determine whether "the government has demonstrated that there is no `genuine issue as to any material fact,' and that it is `entitled to judgment as a matter of law.'" Ibrahim, 522 F.3d at 1008 (citing Fed.R.Civ.P. 56(c)).
In this case, the government supported its position with the declaration of the undercover agent who met with Kardoh multiple times and who was given the $40,000 by Kardoh. The declaration described not only the transactions in sufficient detail to make their impropriety clear but also the statements by Kardoh both before and after his arrest admitting his awareness that the transactions were illegal. Kardoh offered no evidence to rebut the agent's declaration.[2] That is not enough to defeat a motion for summary judgment. See Fed.R.Civ.P. 56(e)(2). On this record, there was no genuine issue as to any material fact and the government was entitled to a judgment as a matter of law.
Accordingly, we conclude that the district court should not have assumed jurisdiction over and granted Kardoh's motion for return of the $40,000.
REVERSED.
NOTES
[*]  The Honorable Glenn L. Archer, Jr., United States Circuit Judge for the Federal Circuit, sitting by designation.
[1]  Rule 41(g) provides:

Motion to Return Property. A person aggrieved by an unlawful search and seizure of property or by the deprivation of property may move for the property's return. The motion must be filed in the district where the property was seized. The court must receive evidence on any factual issue necessary to decide the motion. If it grants the motion, the court must return the property to the movant, but may impose reasonable conditions to protect access to the property and its use in later proceedings.
[2]  Kardoh had been deported by the government and was thus not in the United States at the time of the court proceeding. He could have submitted evidence, including his own declaration, without being in the United States, however, so his failure to rebut the agent's declaration cannot be excused by his deportation.
