
    Tammy R. FIELDS, Plaintiff-Appellee, v. Tolbert PRATER; Laura Elkins; Emogene Elswick; Ruby Ratliff Hale; Harold Thornsbury; Judy Holland, Defendants-Appellants, and W. Pat Justus; Carroll Branham; Eddie Lindsay; David Ratliff; William P. Harris; Buchanan County, Defendants. Tammy R. Fields, Plaintiff-Appellee, v. W. Pat Justus; Carroll Branham; Eddie Lindsay; William P. Harris; David Ratliff, Defendants-Appellants, and Buchanan County; Tolbert Prater; Laura Elkins; Emogene Elswick; Ruby Ratliff Hale; Harold Thornsbury; Judy Holland, Defendants.
    Nos. 08-1437, 08-1471.
    United States Court of Appeals, Fourth Circuit.
    Argued: March 25, 2009.
    Decided: May 21, 2009.
    
      Henry Keuling-Stout, Keuling-Stout, PC, Big Stone Gap, Virginia; Jim H. Guynn, Jr., Guynn, Memmer & Dillon, PC, Salem, Virginia, for Appellants. Timothy Worth McAfee, McAfee Law Firm, PC, Norton, Virginia, for Appellee.
    Before WILLIAMS, Chief Judge, WILKINSON, Circuit Judge, and DAVID A. FABER, Senior United States District Judge for the Southern District of West Virginia, sitting by designation.
    
      Reversed and remanded by published opinion. Judge WILKINSON wrote the opinion, in which Chief Judge WILLIAMS and Senior Judge FABER joined.
   OPINION

WILKINSON, Circuit Judge:

This appeal arises out of plaintiff Tammy Fields’s suit under 42 U.S.C. § 1983, which alleges that defendants conspired to prevent her from being hired as the local director of a county department of social services (“DSS”) because of her political affiliation and in violation of her First Amendment rights. Defendants have appealed the district court’s denial of their motions for summary judgment on the basis of qualified immunity. We conclude that the First Amendment prohibits consideration of political affiliation in hiring decisions for positions like the one at issue here. To hold otherwise would impose prohibitive costs on the exercise of associative rights and political speech. However, because this conclusion was not clearly established at the time of the decision under existing law, we think the defendants entitled to the qualified immunity they seek.

I.

A.

This case concerns the selection of a local director for the Buchanan County Department of Social Services (“BCDSS”). It is thus necessary to explain briefly at the outset the Commonwealth of Virginia’s system for administering social services. Virginia’s social services apparatus serves a number of functions related to public assistance and child welfare, such as the provision of financial assistance and medical care to the indigent, domestic violence prevention, and the enforcement of court-ordered child support payments. This system has both state and local components. At the state level, the Governor appoints the Commissioner of Social Services as well as the nine members of the State Board of Social Services. Va.Code §§ 63.2-201, 63.2-215. As the head of the Virginia Department of Social Services (‘VDSS”), the Commissioner supervises the administration of social services throughout the state. Id. § 63.2-203. The State Board advises the Commissioner, but also has the power to pass regulations which are binding throughout the state and which the Commissioner must enforce. Id. §§ 63.2-203, 63.2-216, 63.2-217.

Subject to the supervision of the Commissioner and in accordance with the regulations passed by the State Board, local boards of social services and their corresponding local departments of social" services administer social services at the local level. Id. §§ 63.2-313, 63.2-324, 63.2-332. Local departments can serve a single county, a single city, or some combination of counties and cities. Id. § 63.2-324. Here, we are only concerned with the laws governing local departments serving single counties. A local director of social services supervises the local department; the director is chosen by, and serves at the pleasure of, the county’s local board. Id. §§ 63.2-324-63.2-326. Local directors are also considered the agents of the Commissioner. Id. § 63.2-333. Local directors who do not meet personnel standards established by the State Board can be removed by the Commissioner. Id. § 63.2-327.

Although the local boards delegate responsibility to their local departments, the boards are the entities ultimately responsible for administering the laws related to social services in their respective jurisdictions. In addition to selecting a director, the duties of a local board include making local policy decisions and exercising discretion over funding decisions. Under state law and regulations adopted by the State Board, all DSS employees are to be hired on the basis of merit, not political affiliation. See id. §§ 68.2-100, 63.2-826; Va. Admin. Code §§ 40-675-30, 40-675-130, 40-675-180.

The governing body of a county determines the composition of the county’s local board. Va.Code § 63.2-302. The county may either designate one local government official as the board, or appoint an administrative board consisting of three or more residents of the county. Id. If the county’s governing body selects the first option, it must also appoint an advisory board, consisting of between five and thirteen members, to aid the government official who has been designated the local board. Id. § 63.2-305.

B.

We turn now to the facts at hand. Plaintiff Tammy Fields and her husband have been active supporters of the Republican Party in Buchanan County for many years. Fields started working for the BCDSS in 1995 as a social worker. In 1997, she was promoted to office manager, a position she still holds. As office manager, she deals with issues related to payroll, insurance, and taxes.

In 2006, the BCDSS local director position became open when the previous director retired. The Buchanan County Board of Supervisors (“BOS”), the county’s governing body, created an interviewing board to evaluate prospective candidates for local director. Fields and six other candidates applied. The interviewing board ranked the seven candidates; Fields received the highest score, while a candidate named Judy Holland received the lowest score. Tony Fritz, the Regional Director for the VDSS, assisted in the interviewing process.

At this time, a local government official was serving as the local administrative board and several other individuals served on an advisory board, as required by state law. For reasons that on the record are unclear, on January 8, 2007, the BOS passed a resolution dissolving the existing administrative and advisory boards and creating a new, seven-member administrative board (“the Local Board”). The resolution was passed unanimously by the BOS, and each of the seven members of the BOS chose someone from their respective supervisory districts to serve on the Local Board. Shortly thereafter, the newly-created Local Board interviewed three candidates, including Fields and Holland. The Local Board subsequently hired Holland.

Fields alleges that the Local Board’s hiring decision was based on the applicants’ party affiliations. According to Fields, Holland was the only applicant politically affiliated with the Democratic Party. She alleges that five members of the Local Board affiliated with the Democratic Party (Laura Elkins, Emogene Elswick, Ruby Ratliff Hale, Tolbert Prater, and Harold Thornsbury) conspired with five members of the BOS who are currently or formerly affiliated with the Democratic Party (Carroll Branham, William P. Harris, W. Pat Justus, Eddie Lindsay, and David Ratliff) to prevent Fields from being hired, and that their reason for doing so was Fields’s support of the Republican Party. Fields further claims that the BOS members chose to create the new administrative board so that they could appoint Democratic Party loyalists to the new board who would thus appoint Holland instead of Fields, and that the new Local Board members cooperated by selecting Holland.

C.

Alleging a violation of her First Amendment rights, Fields brought an action under 42 U.S.C. § 1983 seeking relief in law and equity in the United States District Court for the Western District of Virginia on April 5, 2007. She named as defendants BOS members Branham, Harris, Justus, Lindsay, and Ratliff; Local Board members Elkins, Elswiek, Hale, Prater, and Thornsbury; Buchanan County; and Holland, the newly-selected local director. All defendants moved to dismiss under Federal Rule of Civil Procedure 12(b)(6). The individual defendants contended that they were entitled to qualified immunity, and Buchanan County argued that counties cannot be held liable under § 1983 for personnel decisions made by their local boards.

The district court ordered limited discovery on the issue of qualified immunity. The district court also referred the issue to a magistrate judge, who concluded, based on the pleadings and the record, that defendants were not entitled to qualified immunity. The magistrate also concluded that under Bockes v. Fields, 999 F.2d 788 (4th Cir.1993), Buchanan County could not be held liable under § 1983.

The individual defendants objected to the magistrate’s conclusion that they were not entitled to qualified immunity. The district court, reconsidering the qualified immunity issue de novo, agreed with the magistrate’s recommended disposition. The district court reasoned that consideration of political affiliation by defendants was clearly forbidden by Supreme Court and circuit precedent both because a local director plays little role in developing policy and because there was no evidence that political affiliation was relevant to effective performance of a local director’s duties. The individual defendants brought this interlocutory appeal, arguing that the district court erred in concluding that they were not entitled to qualified immunity. As the issue before us is purely one of law, we possess jurisdiction. Johnson v. Jones, 515 U.S. 304, 313, 115 S.Ct. 2151, 132 L.Ed.2d 238 (1995); Mitchell v. Forsyth, 472 U.S. 511, 528 n. 9, 105 S.Ct. 2806, 86 L.Ed.2d 411 (1985).

II.

Fields alleges that her First Amendment rights were violated when defendants conspired to prevent her from being hired because of her political affiliation. Defendants respond that the local director position is one for which consideration of political affiliation is permissible. Elrod v. Burns, 427 U.S. 347, 96 S.Ct. 2673, 49 L.Ed.2d 547 (1976), was the first case directly addressing whether the First Amendment prohibits consideration of political affiliation in government hiring generally. A plurality of the Court concluded that the practice of patronage imposed an unconstitutional restraint on “freedoms of belief and association..... An individual who is a member of the out-party maintains affiliation with his own party at the risk of losing his job.” Id. at 355, 96 S.Ct. 2673 (plurality opinion). To condition employment on the espousal of party loyalty was tantamount to a system of “coerced belief.” Id. Although there was no majority opinion, Elrod has come to stand for the proposition that under the First Amendment, “a nonpolicymaking, nonconfidential government employee” cannot be “discharged or threatened with discharge from a job that he is satisfactorily performing on the sole ground of his political beliefs.” Id. at 375, 96 S.Ct. 2673 (Stewart, J., concurring in the judgment).

In Branti v. Finkel, 445 U.S. 507, 100 S.Ct. 1287, 63 L.Ed.2d 574 (1980), the Court refined this approach, making clear that “the ultimate inquiry is not whether the label ‘policymaker’ or ‘confidential’ fits a particular position; rather, the question is whether the hiring authority can demonstrate that party affiliation is an appropriate requirement for the effective performance of the public office involved.” Id. at 518, 100 S.Ct. 1287. The Court in Rutan v. Republican Party of Illinois, 497 U.S. 62, 110 S.Ct. 2729, 111 L.Ed.2d 52 (1990), extended the holdings of Elrod and Branti to “promotion, transfer, recall, and hiring decisions based on party affiliation and support,” id. at 79, 110 S.Ct. 2729, and thus to the hiring decision at issue here. Therefore, we must determine whether the local director position was one for which defendants “can demonstrate that party affiliation is an appropriate requirement.” Branti, 445 U.S. at 518, 100 S.Ct. 1287.

A.

Asking whether a position involves policymaking can be helpful in resolving the aforementioned inquiry, and our cases reflect that. In Stott v. Haworth, 916 F.2d 134 (4th Cir.1990), we adopted the First Circuit’s two-part test for conducting this analysis. First, the court should ask whether “the position involve[s] government decisionmaking on issues where there is room for political disagreement on goals or their implementation.... If this first inquiry is satisfied, the next step is to examine the particular responsibilities of the position to determine whether it resembles a policymaker, a privy to confidential information, a communicator, or some other office holder whose function is such that party affiliation is an equally appropriate requirement.” Id. at 141-42 (quoting Jimenez Fuentes v. Torres Gaztambide, 807 F.2d 236, 241-12 (1st Cir.1986) (en banc)).

Under the first prong of the Stott analysis, we examine the matters dealt with by the local director position at a very high level of generality. Is there legitimate political disagreement over the goals or the implementation of social services programs? We have previously answered this question in the affirmative. Nader v. Blair, 549 F.3d 953, 960 (4th Cir.2008) (“With regard to the first part of the analysis, which is whether the position relates to partisan political interests or concerns, positions within social-services agencies clearly may satisfy this requirement.”). This conclusion is plainly correct; few would dispute that decisions about how social services are to be provided, and to whom, are a topic of frequent political controversy.

The second step requires a much more concrete analysis of the specific position at issue. “[I]n conducting this inquiry, courts focus on the powers inherent in a given office.” Stott, 916 F.2d at 142 (quoting Jimenez Fuentes, 807 F.2d at 242). After examining the duties and responsibilities of a local director under Virginia law, we conclude that the position is not one for which political affiliation is an appropriate consideration.

Defendants argue that a local director is a “policymaker.” However, local directors do not have significant policymaking authority under Virginia’s social services scheme. Because the Commonwealth’s social services programs depend in part on grants and aid from the federal government, federal statutes and regulations play a significant role in shaping state policy. See Va.Code §§ 63.2-206, 63.2-406. Of that policy-making which is not federal, most takes place at the state level under Virginia’s system. As we earlier observed, “neither [counties] nor the local boards have authority to set ‘general goals and programs’ for social services personnel; that authority is reserved for the State Board.” Bockes, 999 F.2d at 791. The State Board has the authority to pass regulations which local directors must follow. Va.Code § 63.2-217. The Commissioner has the authority to remove local directors “who do not meet the personnel standards established by the [State] Board.” Id. § 63.2-327. Local directors serve as the Commissioner’s agents. Id. § 63.2-333. The YDSS establishes a statewide plan that local directors are required to follow. See Commonwealth of Virginia, Dep’t of Soc. Services, Local Board Member Handbook 72 (June 2007).

To the extent that there is policymaking authority at the local level, it belongs not with local directors, but with local boards. Local boards may set policies which “together [with state policies], should cover all activities” of a local department. Local Board Member Handbook at 22. Local directors serve at the pleasure of local boards. Va.Code § 63.2-326. Local directors exercise the power granted to them by state law “[u]nder the supervision of the local board.” Id. § 63.2-332. Local boards, not local directors, control the budget of their respective departments of social services, see id. § 63.2-316, are responsible for hiring counsel to represent employees of their local departments, id. § 63.2-317, and have the power to conduct hearings and issue subpoenas. Id. § 63.2-322.

As the district court correctly observed, local directors have “in effect three masters” — the Commissioner, the State Board, and their local board. J.A. 494. In this system there is little room for local directors to make important policy decisions. To be sure, local directors do have the power to set some policies within local departments, as does any director of a governmental institution. Defendants point to the local director’s personnel responsibilities, namely the “duty to organize agency staff[,] to supervise and train staff, [and] to make final hiring promotion, transfer, and discipline decisions.” Brief of Appellants at 36. But that a local director has supervisory power over her staff does not mean she sets social services policy. If having power over subordinates were a sufficient condition for exemption from the requirements of the First Amendment, only the most low-level government employees would be protected from politically-based hiring and firing. “[T]he Branti inquiry is one of degree, and ... low-level policymaking authority ... does not outweigh [an] employee’s First Amendment rights of political affiliation.” Akers v. Caperton, 998 F.2d 220, 225 (4th Cir.1993).

It is not enough for defendants to show merely that local directors make some policy; the ultimate question under Branti is whether local directors make policy about matters to which political ideology is relevant, and we conclude that they do not. Defendants make conclusory assertions about the local director’s policymaking power, but they cannot show “a rational connection between shared ideology and job performance.” Stott, 916 F.2d at 142 (quoting Savage v. Gorski, 850 F.2d 64, 68 (2d Cir.1988)). Unlike the sheriffs deputies in Jenkins v. Medford, 119 F.3d 1156 (4th Cir.1997) (en banc), a local director is not the “alter ego” of an elected official, id. at 1164, and does not “play a special role in implementing” an elected official’s policies. Id. at 1162.

Defendants insist, however, that because a local director’s duties involve confidential information, political affiliation is a relevant consideration under Stott. But this argument proves too much; by virtue of the sensitivity of such matters as public assistance and child welfare, many social services workers deal with confidential information. Yet it cannot be the case that party affiliation is an appropriate criterion for the effective performance of their jobs. As with their arguments about policymaking, defendants attempt to fit the local director position into the labeled category “confidential” without explaining how it proves that political affiliation is actually relevant to a local director’s duties.

Indeed, there is every indication that political philosophy is irrelevant to those duties. VDSS Regional Director Tony Fritz stated in his affidavit that he was “aware of no relationship between political party affiliation and the effective performance of a local Director of DSS. The duties and responsibilities of a local Director do not contain any reference to political party ideologies.” See McConnell v. Adams, 829 F.2d 1319, 1324 (4th Cir.1987) (noting that state Secretary of Elections asserted that political affiliation was not relevant to the job performance of a general county registrar).

We also find it significant that Virginia has explicitly designated the local director position as non-partisan. Regulations passed by the State Board make clear that political affiliation is not an appropriate consideration when hiring DSS employees, and the handbook provided to all local board members across the state underscores this point. See Local Board Member Handbook at 63-67. At the top of the job application form that Fields filled out is the statement that political affiliation shall not be taken into consideration in hiring. See Commonwealth of Virginia, Application for Employment, DHRM Form 10-012. The fact that the State Board — one of the major policymakers in Virginia’s social services system — has forbidden local boards from taking political affiliation into consideration provides further support for our conclusion that political affiliation is not relevant to the duties of a local director.

Of course, “whether a patronage-based dismissal violates the First Amendment is ultimately a question of federal law.” McCrerey v. Allen, 118 F.3d 242, 245 (4th Cir.1997). But whether state law prohibits politically-based hiring for a particular position is relevant to whether political affiliation is “necessary for effective job performance.” McConnell, 829 F.2d at 1323. Although we do not consider state law’s classification of a particular position as dispositive of the constitutional issue, we certainly take it into consideration in our analysis. See, e.g., Jenkins, 119 F.3d at 1163-64; Stott, 916 F.2d at 142-43; McConnell, 829 F.2d at 1324. “[Ljegislative findings are given deference,” Akers, 998 F.2d at 225 n. 7, even if that deference is not absolute; we see no reason why a state administrative agency’s reasoned judgment should not be given some respect as well. Here, the state’s judgment confirms our independent assessment and reinforces the conclusion that the First Amendment prohibits the consideration of political affiliation in hiring for the local director position. In this instance, state law and constitutional law may be seen as pulling in the same direction, with state law protecting the goal of professional merit in employment and constitutional law guarding simultaneously against retribution on the basis of political belief.

This view is consistent with our holding in Nader v. Blair, 549 F.3d 953 (4th Cir.2008), where we concluded that an Assistant Director of the Baltimore City Department of Social Services was a policymaker under Stott. Although the two positions bear some similarities, Maryland law gives the employees of local social services departments significantly more power to shape local policy than does Virginia law. See Nader, 549 F.3d at 960-62. In Virginia, most policy is made at the state level; that which is made at the local level is made by local boards, not local departments. Furthermore, while Virginia regulations prohibit considering political affiliation when hiring and firing local DSS employees, Maryland law explicitly stated that the Nader plaintiffs position was one from which she could be dismissed “for any reason, solely in the discretion of the appointing authority.” Id. at 956. Virginia has chosen to make its social services policymaking more centralized and more separated from local departments than has Maryland. “It is one of the happy incidents of the federal system” that two states are free to make different choices about how to structure their governments. New State Ice Co. v. Liebmann, 285 U.S. 262, 311, 52 S.Ct. 371, 76 L.Ed. 747 (1932) (Brandeis, J., dissenting).

B.

We therefore agree with plaintiff that in the event the facts are as alleged, defendants violated her constitutional rights. But to defeat defendants’ claim of qualified immunity plaintiff must further show that defendants violated clearly established “constitutional rights of which a reasonable person would have known.” Harlow v. Fitzgerald, 457 U.S. 800, 818, 102 S.Ct. 2727, 73 L.Ed.2d 396 (1982). “Officials are not liable for bad guesses in gray areas; they are liable for transgressing bright lines.” Maciariello v. Sumner, 973 F.2d 295, 298 (4th Cir.1992). It is true that defendants knew or should have known that consideration of political affiliation when hiring a local director was forbidden by the State Board’s regulations. However, “an official’s clear violation of a state administrative regulation does not allow a § 1983 plaintiff to overcome the official’s qualified immunity.” Elder v. Holloway, 510 U.S. 510, 515, 114 S.Ct. 1019, 127 L.Ed.2d 344 (1994). The law requires something more, namely that it be clear to a reasonable official at the time of the decision that selecting a local director on the basis of political affiliation contravened the First Amendment.

We conclude that at the time of the hiring decision the law had not achieved that level of constitutional clarity that would allow us to hold defendants liable. In Jenkins, we acknowledged that the caselaw applying Branti had been “conflicting and confusing.” 119 F.3d at 1160 (quoting Upton v. Thompson, 930 F.2d 1209, 1212 (7th Cir.1991)). See also Pike v. Osborne, 301 F.3d 182, 186 (4th Cir. 2002) (Hamilton, J., concurring in the judgment) (observing that “Jenkins is confusing, at best” when applied to a slightly different context than that at issue in the case). The lack of clarity is understandable, given that political patronage at the policymaking level contributes not only to the growth of strong political parties, but to the responsiveness of bureaucracies to electoral mandates whose results policymakers and top government officials properly seek to translate into programs for the public benefit. Thus issues like this one are often matters of degree, and matters of degree are not always plain a priori. Because application of the principles of Branti and Jenkins to new situations invariably requires particularized inquiries into specific positions in the context of specific systems, it is not always easy to say that there is a clearly drawn line between those positions for which consideration of political affiliation is allowed and those for which it is not.

We find McConnell v. Adams, 829 F.2d 1319 (4th Cir.1987), which held that Virginia electoral boards could not permissibly consider political affiliation in employment decisions regarding county registrars, the closest analogue in our precedent to the case at hand. This conclusion supports our determination that there was a constitutional violation here. The system Virginia uses for selection of registrars bears significant similarities to that used to select local directors, and in both contexts the state has strong reasons to prefer professionalism over partisanship. There, as here, we concluded that the defendant board could not consider political affiliation because there was no evidence that political affiliation was relevant to the effective performance of the position, and significant evidence to the contrary. Id. at 1324. There, as here, the state agency whose policies the official in the position at issue would be responsible for carrying out indicated that political affiliation was not an appropriate requirement. Id. However, because a registrar is even less involved in policy-making than is a local director, we do not think that McConnell would have clearly put defendants on notice that their conduct was unconstitutional.

Our respect for the decisions and deliberations of our colleagues also counsels a certain caution in imposing liability here. As we have earlier indicated, the facts of Nader are distinguishable from the case at bar, given the significant differences between Virginia’s and Maryland’s social services systems. In designing its social services apparatus, Virginia, in felicitous harmony with the Branti decision, sought to further three goals: (1) protection of a measure of freedom of conscience and belief within the daily administration of the social services system; (2) recognition of professional merit in a field in which education and experience weigh importantly; and (3) prevention of the politicization of individual determinations on matters such as child support collection and welfare eligibility. Other states might legitimately attempt to protect these values in other ways, but Virginia has sought to do so by lodging policymaking authority at numerous levels above the local director. Undisputed evidence in the record, including an affidavit from a state official familiar with the system and the job application itself, show that political affiliation was not “an appropriate requirement for the effective performance of the public office involved.” Jenkins, 119 F.3d at 1161 (quoting Branti, 445 U.S. at 518, 100 S.Ct. 1287).

But to say that the rule in the Commonwealth is now clear going forward is a different matter from the retrospective imposition of monetary consequence. Both Nader and this case concerned management positions in local services agencies. In both cases, resolving the constitutional issue required a fact-intensive inquiry into the particular responsibilities of the positions and their role in their respective state systems. There was thus no “bright line[ ]” rule in this context. Maciariello, 973 F.2d at 298. The values that Branti and Virginia’s system seek to protect are significant, but qualified immunity also protects important values. Without it, local officials like defendants would be retroactively subject to significant penalties at law for which they did not have proper notice. We find no fault with the able district judge, who concluded that the constitutional rights at issue were clearly established; this was a close question. But because we cannot unequivocally say that defendants knew or should have known they were violating Fields’s constitutional rights when they refused to hire her, they are entitled to qualified immunity.

III.

Fields’s complaint underscores two important values. The first is the right of a citizen to express her basic beliefs without punitive consequences in the workplace. The second is the interest of government in not having its administrative operations overly politicized through patronage below the policy-making level. Defendants claim that when it comes to welfare, “[t]here is a Republican perspective, [a] Demoerat[ic] perspective, an Independent perspective, and numerous other political perspectives.” Brief of Appellants at 8. But the Constitution imposes limits on holding the livelihood of citizens hostage to party loyalty and state law imposes limits on supplanting professional attainment and non-partisan administration in the field of social services with partisan requirements. Both of these interests support the same conclusion here, namely that basing this hiring decision on political affiliation violated plaintiffs First Amendment rights. “[E]ven though a person has no ‘right’ to a valuable governmental benefit and even though the government may deny him the benefit for any number of reasons, there are some reasons upon which the government may not rely.” Perry v. Sindermann, 408 U.S. 593, 597, 92 S.Ct. 2694, 33 L.Ed.2d 570 (1972). Fields had no right to serve as BCDSS director, but defendants had no right to rely on her political affiliation as a reason for not hiring her. Because, however, it was not clearly established under existing law at the time of the hiring decision that the action taken was unconstitutional, defendants are entitled to qualified immunity. The judgment is accordingly reversed and the case is remanded for further proceedings consistent with this opinion.

REVERSED AND REMANDED 
      
      . The magistrate judge correctly concluded that defendants' motions to dismiss had to be treated as motions for summary judgment because in their memoranda defendants had presented to the court matters beyond the pleadings. See Fed.R.Civ.P. 12(d). We thus refer to defendants' motions to dismiss as motions for summary judgment.
     