Opinion by Judge GRABER; Dissent by Judge MICHAEL DALY HAWKINS.
GRABER, Circuit Judge:At the request of the United States Marshals Service (Marshals Service), the County of Alameda (County) held Claude Brooks, a federal detainee, in pretrial detention for 12 days. During that time, Brooks was not arraigned or brought before a federal judicial officer. After his release pursuant to federal instructions, Brooks filed this action against the County, the individual Deputy United States Marshals, and the United States, alleging *1247(as now pertinent) violation of his eonstitm-tional rights, 42 U.S.C. § 1983; false imprisonment; and violation of various California constitutional provisions.2 The United States settled with Brooks, obtaining a dismissal with prejudice, and the claims against the individual Deputy Marshals were dismissed with prejudice by stipulation. The district court then dismissed with prejudice the claims against the County under Federal Rule of Civil Procedure 12(b)(6). On this timely appeal,3 we affirm.
FACTS ALLEGED
Because the district court dismissed the action under Federal Rule of Civil Procedure 12(b)(6), we take all allegations of material fact as true and construe the complaint in the light most favorable to the nonmoving party. See Hicks v. Small, 69 F.3d 967, 969 (9th Cir.1995).
Brooks, a former federal prisoner, was released on parole in early 1987. In February of 1987, while still on parole, Brooks voluntarily entered an 18-month drug treatment program, but he left about a year later without completing it. However, completion of the program was not a condition of parole, and Brooks’ parole was discharged in April of 1987.
On January 18, 1996, officials of the Marshals Service arrested Brooks on a charge of escape. They told him that the escape had something to do with a halfway house. They took Brooks to the Santa Rita jail, which is operated by the County’s sheriff, where he was detained until January 30, 1996. Brooks was never taken before a federal judicial officer during the period of his detention.4 At the end of 12 days, the County complied with federal instructions to release Brooks.
STANDARD OF REVIEW
We review de novo a dismissal for failure to state a claim. See Hicks, 69 F.3d at 969.
DISCUSSION
A. Section 1988
The district court dismissed the § 1983 claim in the original complaint for failure to allege a deliberate County policy. See Monell v. Dep’t of Soc. Servs. of New York, 436 U.S. 658, 98 S.Ct. 2018, 56 L.Ed.2d 611 (1978). Brooks amended his claim to allege that the County’s conduct “was part of a general policy of neglect that [the County] has followed when dealing with federal detainees jailed in County facilities.” Again the district court dismissed the claim, this time with prejudice, on the ground that the complaint did not allege a deliberate County policy with sufficient particularity.
We need not decide whether the district court erred in declining to permit a further amendment,5 because the district court’s ruling was correct even if the complaint had been amended as proposed. See United States v. Kaluna, 192 F.3d 1188, 1999 WL 770907, at *7 n. 2 (9th Cir. Sept. 30, 1999) (en banc) (holding that a district court’s ruling may be upheld on an alternative ground supported by the record). That is so because the alleged actions of *1248the County, even as detailed in the proposed amendment, were not a legal cause of Brooks’ injury.
According to the complaint (in all its iterations), the County held Brooks only so long as the Marshals Service directed it to, and no longer. The County acted pursuant to a state statute, California Penal Code § 4005(a), which requires county sheriffs to “receive, and keep in the county jail, any prisoner committed thereto by process or order issued under the authority of the United States, until he or she is discharged according to law.” There is no allegation that the County failed to follow either the instructions of the Marshals Service or the mandates of the state statute. There is no allegation that the statute itself is unconstitutional.
In the circumstances, the County’s policies, whatever they may have been, could not have altered what happened to Brooks. The County was without authority either to bring Brooks before a federal magistrate judge itself, because it cannot act for the United States, or to release him, because it cannot ignore the state statute. Indeed, Brooks does not allege that the County could have pursued either of those courses. Therefore, the only causes of Brooks’ prolonged detention were the actions of the United States (which settled with Brooks) and the state statute (which goes unchallenged). Causation is, of course, a required element of a § 1983 claim. See Oviatt v. Pearce, 954 F.2d 1470,1474 (9th Cir.1992).
Oviatt, however, on which Plaintiff principally relies, is distinguishable. In that case, Multnomah County officers arrested Oviatt on Oregon state law charges and took him to the Multnomah County jail. A clerk of the court in Multnomah County accidentally removed Oviatt’s name from the arraignment docket sheet, so he was not called for arraignment. He remained incarcerated for 114 days without a hearing. A jury found in Oviatt’s favor on his § 1983 claim and his state claim for false imprisonment, and this court affirmed. See id. at 1474-80. We reasoned that Multnomah County could have taken reasonable steps (for example, a county-wide computer program or a manual comparison between the County’s booking sheet and the County’s court docket) to keep track of its inmates; indeed, Multnomah County appears to have admitted causation. See id. at 1478-79. Those steps could have been effective because of the linkages within the state system at issue.
By contrast, here, such linkages are absent: Whereas Oviatt was a case involving whether the left hand knew what the right hand was doing, this is a case involving whether my left hand knows what your right hand is doing. Unlike in Oviatt, the County had no ability itself to bring the prisoner before the appropriate judicial officer. Indeed, in the proposed amended complaint Brooks alleges only that the County should have asked for federal help, a recognition that the County’s options included neither bringing Brooks before a federal judicial officer nor releasing him. That being so, the element of causation is missing from the § 1983 claim, and dismissal with prejudice was proper.
B. State Law Claims
1. False Imprisonment Claim
Under California law, false imprisonment is “a violation of the personal liberty of another accomplished without lawful authority.” Asgari v. City of Los Angeles, 15 Cal.4th 744, 753, 63 Cal. Rptr.2d 842, 937 P.2d 273 (1997). There are two bases for claiming false imprisonment: imprisonment pursuant to a false arrest and unreasonable delay in bringing the arrested person before a judicial officer. See Lopez v. City of Oxnard, 207 Cal.App.3d 1, 7, 254 Cal.Rptr. 556 (1989); City of Newport Beach v. Sasse, 9 Cal. App.3d 803, 810, 88 Cal.Rptr. 476 (1970).
Here, neither branch of the doctrine can be satisfied because of the particular circumstances in which the County acted. As *1249noted, the inception of the confinement was pursuant to a facially valid commitment order of the United States. Moreover, the duration of the confinement was pursuant to that order and pursuant to a facially valid — and unchallenged — state statute requiring continued detention until a prisoner is discharged according to law. It is undisputed that the County did not keep Brooks any longer than the United States told it to. The district court did not err in dismissing the false imprisonment claim with prejudice.
2. State Constitutional Claims
The district court dismissed.these claims with prejudice for a number of reasons. Among other things, the district court reasoned that these claims were premised entirely on the now-dismissed false arrest and false imprisonment claims and that, in the absence of federal claims, there remained no independent basis for federal jurisdiction. For the reasons discussed above, the court properly dismissed the underlying federal claim, as well as the false imprisonment claim.6 Therefore, the district court did not err in dismissing the state constitutional claims.
CONCLUSION
Brooks held the federal government to account for its failure to bring him promptly before a judicial officer on a federal charge. Because of the County’s inability in the circumstances to have brought him before a federal judicial officer on the federal charge, or to have released him, Brooks cannot hold the County liable for the same failure.
AFFIRMED.
APPENDIX
The proposed Second Amended Complaint alleged in part:
30. On information and belief, plaintiff alleges the following:
a. That ALAMEDA COUNTY’S conduct was part of a general, deliberate, and official policy of neglect that ALAMEDA COUNTY has followed when dealing with federal detainees jailed in County facilities.
b. That the COUNTY, sheriff, and other responsible County policy-making officials knew that there was a problem involving detainees not being timely arraigned or receiving other timely pretrial procedures, especially federal detainees.
c. That the COUNTY, sheriff, and other responsible County policy-making officials' made a deliberate decision not to institute tracking and other procedures to help avoid such problems, especially in the case of federal detainees, on the excuse that it would be too costly, too bothersome, too inconvenient, -or for some other constitutionally inadequate reason, when in fact the procedures would not be too costly, too bothersome, or too inconvenient to be feasible.
d. That the COUNTY, sheriff, and other responsible County policy-making officials followed a conscious, deliberate, and irresponsible “bus locker” policy, with respect to federal detainees. Under this policy, the County essentially treated the jail as if it was a coin-operated bus station locker for federal detainees, into which the federal marshals could deposit a detainee for as long as the marshals wanted, and under which policy the County would simply keep the detainee as if they were storing personal items at a bus station locker until the marshals returned to collect the detainee. Un- . der this policy, the County views its sole responsibility as feeding, clothing, housing, and otherwise caring for these hapless detainees, while collecting federal dollars for this service. *1250Everything else, the County leaves up to the federal authorities, including keeping track of whether federal detainees received prompt arraignments or other prompt pretrial procedures,
e. That there were procedures that the COUNTY could have followed that would have alleviated problems for federal detainees in general and plaintiff in particular. Such procedures were obvious and feasible and would have included, for example, noting the date the federal detainee was first brought to the Santa Rita facility, noting a date by which a federal detainee should have been brought before a federal magistrate or arraigned, initially informing the marshals that the detainee needed to be taken before a magistrate within a certain time period (normally 48 hours) and then calling the federal court clerk, magistrate, or U.S. Attorney if a particular detainee had not been brought before a magistrate within this time. Such procedures could also have included contacting the federal defender or other public counsel on a detainee’s behalf if a detainee was not promptly arraigned or brought before the magistrate.
(Emphasis added.)
. Brooks also brought other claims, but he has abandoned them.
. Brooks died of natural causes after the district court ruled; his estate brings the appeal.
. A federal prisoner’s right to be taken before a judicial officer after arrest derives from 18 U.S.C. § 3142(f) (requiring a judicial officer to hold a detention hearing to determine whether a defendant should be released or detained pending trial); Federal Rule of Criminal Procedure 5(a) (requiring an arresting officer to take the arrested person before a federal magistrate judge “without unnecessary delay”); and Northern District of California Local Criminal Rule 5-1 (c) (requiring that a person arrested for a federal offense be brought before the nearest available magistrate judge).
. The false arrest claim was among those that Brooks abandoned.