(delivered the opinion of the Court)
This case concerns a charge that two Secret Service agents, in carrying out their responsibility to protect the President, engaged in unconstitutional viewpoint-based discrimination. The episode in suit occurred in Jacksonville, Oregon, on the evening of October 14, 2004. President George W. Bush, campaigning in the area for a second term, was scheduled to spend the evening at a cottage in Jacksonville. With permission from local law enforcement officials, two groups assembled on opposite sides of the street on which the President’s motorcade was to travel to reach the cottage. One group supported the President, the other opposed him.
The President made a last-minute decision to stop in town for dinner before completing the drive to the cottage. His motorcade therefore turned from the planned route and proceeded to the outdoor patio dining area of the Jacksonville Inn’s restaurant. Learning of the route change, the protesters moved down the sidewalk to the area in front of the Inn. The President’s supporters remained across the street and about a half block away from the Inn. At the direction of the Secret Service agents, state and local police cleared the block on which the Inn was located and moved the protesters some two blocks away to a street beyond handgun or explosive reach of the President. The move placed the protesters a block farther away from the Inn than the supporters.
Officials are sheltered from suit, under a doctrine known as qualified immunity, when their conduct “does not violate clearly established .... constitutional rights” a reasonable official, similarly situated, would have comprehended. Harlow v Fitzgerald, 457 U. S. 800, 818(1982). The First Amendment, our precedent makes plain, disfavours viewpoint-based discrimination. See Rosenberger v Rector and Visitors of Univ. of Va., 515 U. S. 819, 828(1995). But safeguarding the President is also of overwhelming importance in our constitutional system. See Watts v United States, 394 U. S. 705, 707 (1969) (per curiam). Faced with the President’s sudden decision to stop for dinner, the Secret Service agents had to cope with a security situation not earlier anticipated. No decision of this Court so much as hinted that their on-the-spot action was unlawful because they failed to keep the protesters and supporters, throughout the episode, equidistant from the President.
The United States Court of Appeals for the Ninth Circuit ruled otherwise. It found dispositive of the agents’ motion to dismiss “the considerable disparity in the distance each group was allowed to stand from the Presiden[t].” Moss v United States Secret Serv., 711 F. 3d 941, 946 (2013). Because no “clearly established law” so controlled the agents’ response to the motorcade’s detour, we reverse the Ninth Circuit’s judgment.
On October 14, 2004, after a nearby campaign appearance, President George W. Bush was scheduled to spend the night at a cottage in Jacksonville, Oregon. Anticipating the visit, a group of individuals, including respondents (the protesters), organized a demonstration to express their opposition to the President and his policies. At around 6:00 p.m. on the evening the President’s motorcade was expected to pass through the town, between 200 and 300 protesters gathered in Jacksonville, on California Street between Third and Fourth Streets. See infra, at 4 (map depicting the relevant area in Jacksonville). The gathering had been pre-cleared with local law enforcement authorities. On the opposite side of Third Street, a similarly sized group of individuals (the supporters) assembled to show their support for the President. If, as planned, the motorcade had travelled down Third Street to reach the cottage, with no stops along the way, the protesters and supporters would have had equal access to the President throughout in delivering their respective messages.
This situation was unsettled when President Bush made a spur-of-the-moment decision to stop for dinner at the Jacksonville Inn before proceeding to the cottage. The Inn stands on the north side of California Street, on the block where the protesters had assembled. Learning of the President’s change in plans, the protesters moved along the block to face the Inn. The respective positions of the protesters and supporters at the time the President arrived at the Inn are shown on the following map, which the protesters attached as an exhibit to their complaint:
(click on diagram for a larger image of same)
As the map indicates, the protesters massed on the sidewalk directly in front of the Inn, while the supporters remained assembled on the block west of Third Street, some distance from the Inn. The map also shows an alley running along the east side of the Inn (the California Street alley) leading to an outdoor patio used by the Inn’s restaurant as a dining area. A six-foot high wooden fence surrounded the patio. At the location where the President’s supporters gathered, a large two-story building, the U. S. Hotel, extended north around the corner of California and Third Streets. That structure blocked sight of, and weapons access to, the patio from points on California Street west of the Inn.
Petitioners are two Secret Service agents (the agents) responsible for the President’s security during the Jacksonville visit. Shortly after 7:00 p.m. on the evening in question, the agents enlisted the aid of local police officers to secure the area for the President’s unexpected stop at the Inn. Following the agents’ instructions, the local officers first cleared the alley running from Third Street to the patio (the Third Street alley), which the President’s motorcade would use to access the Inn. The officers then cleared Third Street north of California Street, as well as the California Street alley.
At around 7:15 p.m., the President arrived at the Inn. As the motorcade entered the Third Street alley, both sets of demonstrators were equally within the President’s sight and hearing. When the President reached the outdoor patio dining area, the protesters stood on the sidewalk directly in front of the California Street alley, exhibiting signs and chanting slogans critical of the President and his policies. In view of the short distance between California Street and the patio, the protesters no longer contest that they were then within weapons range of the President. See Tr. of Oral Arg. 3–4, 35, 39–40; Brief for Petitioners 44.
Approximately 15 minutes later, the agents directed the officers to clear the protesters from the block in front of the Inn and move them to the east side of Fourth Street. From their new location, the protesters were roughly the same distance from the President as the supporters. But unlike the supporters, whose sight and access were obstructed by the U. S. Hotel, only a parking lot separated the protesters from the patio. The protesters thus remained within weapons range of, and had a direct line of sight to, the President’s location. This sight line is illustrated by the broken arrow marked on the map below.
(click on diagram for a larger image of same)
After another 15 minutes passed, the agents directed the officers again to move the protesters, this time one block farther away from the Inn, to the east side of Fifth Street. The relocation was necessary, the agents told the local officers, to ensure that no demonstrator would be “within handgun or explosive range of the President.” App. to Pet. for Cert. 177a. The agents, however, did not require the guests already inside the Inn to leave, stay clear of the patio, or go through any security screening. The supporters at all times retained their original location on the west side of Third Street.
After the President dined, the motorcade left the Inn by travelling south on Third Street toward the cottage. On its way, the motorcade passed the President’s supporters. The protesters remained on Fifth Street, two blocks away from the motorcade’s route, thus beyond the President’s sight and hearing.
The protesters sued the agents for damages in the U. S. District Court for the District of Oregon. The agents’ actions, the complaint asserted, violated the protesters’ First Amendment rights by the manner in which the agents established a security perimeter around the President during his unscheduled stop for dinner. See Bivens v Six Unknown Fed. Narcotics Agents, 403 U. S. 388 (1971) (recognizing claim for damages against federal agents for violations of plaintiff’s Fourth Amendment rights). Specifically, the protesters alleged that the agents engaged in viewpoint discrimination when they moved the protesters away from the Inn, while allowing the supporters to remain in their original location.
The agents moved to dismiss the complaint on the ground that the protesters’ allegations were insufficient to state a claim for violation of the First Amendment. The agents further maintained that they were sheltered by qualified immunity because the constitutional right alleged by the protesters was not clearly established.
The District Court denied the motion, see Moss v United States Secret Serv., 2007 WL 2915608, *1, 20 (D Ore., Oct. 7, 2007), but on interlocutory appeal, the U. S. Court of Appeals for the Ninth Circuit reversed. See Moss v United States Secret Serv., 572 F. 3d 962 (2009). The facts alleged in the complaint, the Court of Appeals held, were insufficient to state a First Amendment claim under the pleading standards prescribed in Bell Atlantic Corp. v Twombly, 550 U. S. 544 (2007) , and Ashcroft v Iqbal, 556 U. S. 662(2009) . 572 F. 3d, at 974–975. Because Twombly and Iqbal were decided after the protesters filed their complaint, however, the Ninth Circuit instructed the District Court to grant the protesters leave to amend. 572 F. 3d, at 972.
On remand, the protesters supplemented their complaint with allegations that the agents acted pursuant to an “actual but unwritten” Secret Service policy of “work[ing] with the White House under President Bush to eliminate dissent and protest from presidential appearances.” App. to Pet. for Cert. 184a. Relying on published media reports, the protesters’ amended complaint cited several instances in which other Secret Service agents allegedly engaged in conduct designed to suppress expression critical of President Bush at his public appearances. The amended complaint also included an excerpt from a White House manual instructing the President’s advance team to “work with the Secret Service and have them ask the local police department to designate a protest area where demonstrators can be placed; preferably not in view of the event site or motorcade route.” Id., at 219a. See also id., at 183a.
The agents renewed their motion to dismiss the suit for failure to state a claim and on qualified immunity grounds. The District Court denied the motion, holding that the complaint adequately alleged a violation of the First Amendment, and that the constitutional right asserted was clearly established. Moss v United States Secret Serv., 750 F. Supp. 2d 1197, 1216–1228 (Ore. 2010). The agents again sought an interlocutory appeal.
This time, the Ninth Circuit affirmed, 711 F. 3d 941, satisfied that the amended pleading plausibly alleged that the agents “sought to suppress [the protesters’] political speech” based on the viewpoint they expressed, id., at 958. Viewpoint-driven conduct, the Court of Appeals maintained, could be inferred from the absence of a legitimate security rationale for “the differential treatment” accorded the two groups of demonstrators. See id., at 946. The Court of Appeals further held that the agents were not entitled to qualified immunity because this Court’s precedent “make[s] clear .... ‘that the government may not regulate speech based on its substantive content or the message it conveys.’ ” Id., at 963 (quoting Rosenberger, 515 U. S., at 828).
The agents petitioned for rehearing and rehearing en banc, urging that the panel erred in finding the alleged constitutional violation clearly established. Over the dissent of eight judges, the Ninth Circuit denied the en banc petition. See 711 F. 3d, at 947 (O’Scannlain, J., dissenting from denial of rehearing en banc). We granted certiorari. 571 U. S. ___ (2013).
It is uncontested and uncontestable that government officials may not exclude from public places persons engaged in peaceful expressive activity solely because the government actor fears, dislikes, or disagrees with the views those persons express. See, e.g., Police Dept. of Chicago v Mosley, 408 U. S. 92, 96 (1972) . It is equally plain that the fundamental right to speak secured by the First Amendment does not leave people at liberty to publicize their views “ ‘whenever and however and wherever they please.’ ” United States v Grace, 461 U. S. 171–178 (1983) (quoting Adderly v Florida, 385 U. S.39, 48 (1966)). Our decision in this case starts from those premises.
The particular question before us is whether the protesters have alleged violation of a clearly established First Amendment right based on the agents’ decision to order the protesters moved from their original location in front of the Inn, first to the block just east of the Inn, and then another block farther. We note, initially, an antecedent issue: Does the First Amendment give rise to an implied right of action for damages against federal officers who violate that Amendment’s guarantees? In Bivens, cited supra, at 8, we recognized an implied right of action against federal officers for violations of the Fourth Amendment. Thereafter, we have several times assumed without deciding that Bivens extends to First Amendment claims. See, e.g., Iqbal, 556 U. S., at 675. We do so again in this case. See Tr. of Oral Arg. 10–11 (counsel for petitioners observed that the implication of a right to sue derived from the First Amendment itself was an issue “not preserved below” and therefore “not presented” in this Court).
The doctrine of qualified immunity protects government officials from liability for civil damages “unless a plaintiff pleads facts showing (1) that the official violated a statutory or constitutional right, and (2) that the right was ‘clearly established’ at the time of the challenged conduct.” Ashcroft v al-Kidd, 563 U. S. ___, ___ (2011) (slip op., at 3). And under the governing pleading standard, the “complaint must contain sufficient factual matter, accepted as true, to state a claim to relief that is plausible on its face.” Iqbal, 556 U. S., at 678 (internal quotation marks omitted). Requiring the alleged violation of law to be “clearly established” “balances .... the need to hold public officials accountable when they exercise power irresponsibly and the need to shield officials from harassment, distraction, and liability when they perform their duties reasonably.” Pearson v Callahan, 555 U. S. 223, 231 (2009). The “dispositive inquiry,” we have said, “is whether it would [have been] clear to a reasonable officer” in the agents’ position “that [their] conduct was unlawful in the situation [they] confronted.” Saucier v Katz, 533 U. S. 194, 202 (2001) .
At the time of the Jacksonville incident, this Court had addressed a constitutional challenge to Secret Service actions on only one occasion. In Hunter v Bryant, 502 U. S. 224 (1991) (per curiam), the plaintiff sued two Secret Service agents alleging that they arrested him without probable cause for writing and delivering to two University of Southern California offices a letter referring to a plot to assassinate President Ronald Reagan. We held that qualified immunity shielded the agents from claims that the arrest violated the plaintiff’s rights under the Fourth, Fifth, Sixth, and Fourteenth Amendments. “[N]owhere,” we stated, is “accommodation for reasonable error .... more important than when the specter of Presidential assassination is raised.” Id., at 229.
In other contexts, we have similarly recognized the Nation’s “valid, even .... overwhelming, interest in protecting the safety of its Chief Executive.” Watts, 394 U. S., at 707. See also Rubin v United States, 525 U. S. 990–991 (1998) (Breyer, J., dissenting from denial of certiorari) (“The physical security of the President of the United States has a special legal role to play in our constitutional system.”). Mindful that “[o]fficers assigned to protect public officials must make singularly swift, on the spot, decisions whether the safety of the person they are guarding is in jeopardy,” Reichle v Howards, 566 U. S. ___, ___ (2012) (Ginsburg, J., concurring in judgment) (slip op., at 2), we address the key question: Should it have been clear to the agents that the security perimeter they established violated the First Amendment?
The protesters assert that it violated clearly established First Amendment law to deny them “equal access to the President,” App. Pet. for Cert. 175a, during his dinner at the Inn and subsequent drive to the cottage, id., at 185a. The Court of Appeals agreed, holding that the agents violated clearly established law by moving the protesters to a location that “was in relevant ways not comparable to the place where the pro-Bush group was allowed to remain.” 711 F. 3d, at 946 (internal quotation marks and ellipsis omitted). The Ninth Circuit did not deny that security concerns justified “mov[ing] the anti-Bush protesters somewhere.” Ibid. But, the court determined, no reason was shown for “the considerable disparity in the distance each group was allowed to stand from the Presidential party.” Ibid. The agents thus offended the First Amendment, in the Court of Appeals’ view, because their directions to the local officers placed the protesters at a “comparativ[e] disadvantag[e] in expressing their views” to the President. Ibid.
No decision of which we are aware, however, would alert Secret Service agents engaged in crowd control that they bear a First Amendment obligation “to ensure that groups with different viewpoints are at comparable locations at all times.” Id., at 952 (O’Scannlain, J., dissenting from denial of rehearing en banc). Nor would the maintenance of equal access make sense in the situation the agents confronted.
Recall that at the protesters’ location on the north side of California Street, see supra, at 4, they faced an alley giving them a direct line of sight to the outdoor patio where the President stopped to dine. The first move, to the corner of Fourth and California Streets, proved no solution, for there, only a parking lot stood between the protesters and the patio. True, at both locations, a six-foot wooden fence and an unspecified number of local police officers impeded access to the President. Even so, 200 to 300 protesters were within weapons range, and had a largely unobstructed view, of the President’s location. See Tr. of Oral Arg. 41 (counsel for respondents acknowledged that “in hindsight, you could .... conclude” that “proximity [of the protesters to the President] alone .... is enough to create a security [risk]”). See also Eggen & Fletcher, FBI: Grenade Was a Threat to Bush, Washington Post, May 19, 2005, p. A1 (reporting that a live grenade thrown at President Bush in 2005, had it detonated, could have injured him from 100 feet away).
The protesters suggest that the agents could have moved the President’s supporters further to the west so that they would not be in range of the President when the motorcade drove from the Inn to the cottage where the President would stay overnight. See App. Pet. for Cert. 178a. As earlier explained, however, see supra, at 4–5, there would have been no security rationale for such a move. In contrast to the open alley and parking lot on the east side of the Inn, to the west of the Inn where the supporters stood, a large, two-story building blocked sight of, or weapons access to, the patio the agents endeavoured to secure. No clearly established law, we agree, required the Secret Service “to interfere with even more speech than security concerns would require in an attempt to keep opposing groups at roughly equal distances from the President.” Brief for Petitioners 32. And surely no such law required the agents to attempt to maintain equal distances by “prevail[ing] upon the President not to dine at the Inn.” Oral Arg. Audio in No. 10–36152 (CA9) 42:22 to 43:36 (argument by protesters’ counsel), available at http://www.ca9.uscourts.gov/media/view.php?pk_id=0000008129.(as visited May 19, 2014, and in Clerk of Court’s case file) (argument tendered by protesters’ counsel).
The protesters allege that, when the agents directed their displacement, the agents acted not to ensure the President’s safety from handguns or explosive devices. Instead, the protesters urge, the agents had them moved solely to insulate the President from their message, thereby giving the President’s supporters greater visibility and audibility. See Tr. of Oral Arg. 35–36. The Ninth Circuit found sufficient the protesters’ allegations that the agents “acted with the sole intent to discriminate against [the protesters] because of their viewpoint”. 711 F. 3d, at 964. Accordingly, the Court of Appeals “allow[ed] the protestors’ claim of viewpoint discrimination to proceed.” Id., at 962.
It may be, the agents acknowledged, that clearly established law proscribed the Secret Service from disadvantaging one group of speakers in comparison to another if the agents had “no objectively reasonable security rationale” for their conduct, but acted solely to inhibit the expression of disfavoured views. See Tr. of Oral Arg. 28–29; Brief for Petitioners 52 (entitlement to relief might have been established if, for example, “the pro-Bush group had .... been allowed to move into the nearer location that the anti-Bush had vacated”). We agree with the agents, however, that the map itself, reproduced supra, at 4, undermines the protesters’ allegations of viewpoint discrimination as the sole reason for the agents’ directions. The map corroborates that, because of their location, the protesters posed a potential security risk to the President, while the supporters, because of their location, did not.
The protesters make three arguments to shore up their charge that the agents’ asserted security concerns are disingenuous. First, the protesters urge that, had the agents’ professed interest in the President’s safety been sincere, the agents would have directed all persons present at the Inn to be screened or removed from the premises. See Brief for Respondents 27. But staff, other diners, and Inn guests were there even before the agents themselves knew that the President would dine at the Inn. See Brief for Petitioners 47. Those already at the Inn “could not have had any expectation that they would see the President that evening or any opportunity to premeditate a plan to cause him harm.” Reply Brief 16. The Secret Service, moreover, could take measures to ensure that the relatively small number of people already inside the Inn were kept under close watch; no similar surveillance would have been possible for 200 to 300 people congregating in front of the Inn. See ibid.
The protesters also point to a White House manual, which states that the President’s advance team should “work with the Secret Service .... to designate a protest area .... preferably not in view of the event site or motorcade route.” App. to Pet. for Cert. 219a. This manual guides the conduct of the President’s political advance team. See id., at 220a (distinguishing between the political role of the advance team and the security mission of the Secret Service). As the complaint acknowledges, the Secret Service has its own “written guidelines, directives, instructions and rules.” Id., at 184a. Those guides explicitly “prohibit Secret Service agents from discriminating between anti-government and pro-government demonstrators.” Ibid.
The protesters maintain that the Secret Service does not adhere to its own written guides. They recite several instances in which Secret Service agents allegedly engaged in viewpoint discrimination. See id., at 189a–194a. Even accepting as true the submission that Secret Service agents, at times, have assisted in shielding the President from political speech, this case is scarcely one in which the agents acted “without a valid security reason.” Brief for Respondents 40. We emphasize, again, that the protesters were at least as close to the President as were the supporters when the motorcade arrived at the Jacksonville Inn. See supra, at 5. And as the map attached to the complaint shows, see supra, at 4, when the President reached the patio to dine, the protesters, but not the supporters, were within weapons range of his location. See supra, at 14. Given that situation, the protesters cannot plausibly urge that the agents “had no valid security reason to request or order the[ir] eviction.” App. to Pet. for Cert. 186a.
We note, moreover, that individual government officials “cannot be held liable” in a Bivens suit “unless they themselves acted [unconstitutionally].” Iqbal, 556 U. S., at 683. We therefore decline to infer from alleged instances of misconduct on the part of particular agents an unwritten policy of the Secret Service to suppress disfavoured expression, and then to attribute that supposed policy to all field-level operatives. See Reply Brief 20.
* * *
This case comes to us on the agents’ petition to review the Ninth Circuit’s denial of their qualified immunity defence. See Tr. of Oral Arg. 10 (petitioners’ briefing on appeal trained on the issue of qualified immunity). Limiting our decision to that question, we hold, for the reasons stated, that the agents are entitled to qualified immunity. Accordingly, we reverse the judgment of the Court of Appeals.
It is so ordered.
 App. to Brief for Petitioners (Diagram A).
 This map appears as an appendix to the agents’ opening brief. See App. to Brief for Petitioners (Diagram B). Except for the arrow, Diagram B is identical to the map included in the protesters’ complaint.
 The protesters’ complaint also asserted claims against local police officers for using excessive force in violation of the Fourth Amendment. Those claims were dismissed for failure to state a claim, see Moss v United States Secret Serv., 711 F. 3d 941, 954 (CA9 2013), and are not at issue here.
 We have repeatedly “stressed the importance of resolving immunity questions at the earliest possible stage [of the] litigation,” Hunter v Bryant, 502 U. S. 224, 227 (1991) (per curiam).
 In ruling on a motion to dismiss, we have instructed, courts “must take all of the factual allegations in the complaint as true,” but “are not bound to accept as true a legal conclusion couched as a factual allegation.” Ashcroft v Iqbal, 556 U. S. 662, 678 (2009) (internal quotation marks omitted).
 Subsequent to the incident at issue here, we held in Reichle v Howards, 566 U. S. ___, ___ (2012) (slip op., at 1), that two Secret Service agents were “immune from suit for allegedly arresting a suspect in retaliation for [negative comments he made about Vice President Cheney], when the agents had probable cause to arrest the suspect for committing a federal crime.”
 The protesters, however, do not maintain that “the First Amendment entitled them to be returned to their original location after the President’s dinner and before his motorcade departed.” Brief for Respondents 39–40, n. 7. They urge only that “it was constitutionally improper to move them in the first place.” Id., at 40, n. 7; see Tr. of Oral Arg. 50 (same).
 Neither side contends that the presence of demonstrators along the President’s motorcade route posed an unmanageable security risk, or that there would have been a legitimate security rationale for removing the protesters, but not the supporters, from the motorcade route. The President’s detour for dinner, however, set the two groups apart. “[T]he security concerns arising from the presence of a large group of people near the open-air patio where the President was dining were plainly different from those associated with permitting a group .... to remain along Third Street while the President’s [armoured limousine] travelled by.” Brief for Petitioners 46.
 “An ‘advance man’ is ‘[o]ne who arranges for publicity, protocol, transportation, speaking schedules, conferences with local government officials, and minute details of a visit, smoothing the way for a political figure.’ ” See 711 F. 3d, at 950, n. 2 (O’Scannlain, J., dissenting from denial of rehearing en banc) (quoting W. Safire, Safire’s Political Dictionary 8 (5th ed. 2008)).
Donald B. Verrilli, JR. Solicitor General Counsel of Record
Stuart F. Delery Acting Assistant Attorney General
Malcolm L. Stewart Deputy Solicitor General
Curtis E. Gannon Assistant to the Solicitor General
Barbara L. Herwig Attorneys
Edward Himmelfarb Attorneys
Jeremy S. Brumbelow Attorneys
all rights reserved