                  United States Court of Appeals
                             For the Eighth Circuit
                         ___________________________

                                 No. 14-1931
                         ___________________________

                                Mark Alan Greenman

                        lllllllllllllllllllll Plaintiff - Appellant

                                            v.

  Officer Jeremiah Jessen; Sgt. Jason Nelson; Chief Ed Belland; City of Medina;
                                 Steven M. Tallen

                      lllllllllllllllllllll Defendants - Appellees
                                       ____________

                     Appeal from United States District Court
                    for the District of Minnesota - Minneapolis
                                   ____________

                          Submitted: December 11, 2014
                              Filed: May 28, 2015
                                 ____________

Before LOKEN, BRIGHT, and KELLY, Circuit Judges.
                           ____________

KELLY, Circuit Judge.

      Mark Greenman filed a 42 U.S.C. § 1983 action against the City of Medina,
Minnesota, three Medina police officers, and Steven M. Tallen, the prosecutor for the
City of Medina. Greenman asserted the police officers and city prosecutor violated
his Fourth Amendment right to be free from unreasonable search and seizure, his
Fourteenth Amendment due-process rights, and his First Amendment rights to free
speech and to petition the government for redress of grievances. He further alleged
the City of Medina was liable for not properly training and supervising its police
officers. He also filed several state-law claims. The district court1 dismissed all the
federal claims, on the basis that the police officers and city prosecutor were entitled
to qualified immunity, and declined to exercise supplemental jurisdiction over
Greenman’s state-law claims. Having jurisdiction under 28 U.S.C. § 1291, we affirm.

                                  I. Background

       The facts, construed in the light most favorable to Greenman,2 are as follows.
Medina police officers arrested Greenman on three separate occasions for, among
other things, operating his Segway while under the influence of alcohol (DWI) in
violation of Minnesota Statutes Chapter 169A. According to Greenman’s complaint,
a Segway is “a two-wheeled battery-operated device, where the operator stands
upright and can make it move by leaning on the handle.”

      The first arrest took place on August 17, 2010, when Officer Jeremiah Jessen
stopped Greenman at approximately 8:56 p.m. after he observed Greenman driving
his Segway on a roadway in Medina. This was after sunset, and Officer Jessen
observed that the Segway did not have a headlight or other lights. Officer Jessen
ultimately arrested and detained Greenman. On October 15, 2010, Sergeant Jason


      1
      The Honorable David S. Doty, United States District Judge for the District of
Minnesota.
      2
        Tallen moved to dismiss Greenman’s claims for failure to state a claim under
Federal Rule of Civil Procedure 12(b)(6); the City and police officers filed a Motion
for Judgment on the Pleadings pursuant to Federal Rule of Civil Procedure 12(c). For
purposes of both types of motions, we assume factual allegations in the complaint to
be true. See Hopkins v. City of Bloomington, 774 F.3d 490, 492 (8th Cir. 2014) (Rule
12(b)(6) motion); Poehl v. Countrywide Home Loans, Inc., 528 F.3d 1093, 1096 (8th
Cir. 2008) (Rule 12(c) motion).

                                         -2-
Nelson filed a formal criminal complaint against Greenman, charging him with (1)
gross misdemeanor DWI, (2) misdemeanor DWI, (3) misdemeanor careless driving,
and (4) possession of marijuana in a motor vehicle.3 The misdemeanor careless
driving charge was later amended to a petty misdemeanor charge of operating his
Segway without due care, and the possession charge was amended to reflect a smaller
amount of marijuana.

       Greenman moved to dismiss the charges for lack of probable cause. On June
17, 2011, Hennepin County District Court Judge Ronald Abrams dismissed the two
DWI charges and the marijuana charge but found probable cause for the charge of
failing to operate an electric personal assistive mobility device with due care.4 In
dismissing the DWI charges, Judge Abrams held a Segway was not a “motor vehicle”
for purposes of the DWI statute. Following a bench trial, Greenman was acquitted of
operating his Segway without due care. The City of Medina did not appeal.

       The second arrest took place on February 4, 2012, when Officer Jessen again
arrested Greenman, this time for operating his Segway while intoxicated and without
due care. On March 22, 2012, Police Chief Ed Belland signed and filed a formal
criminal complaint in Hennepin County District Court, alleging two counts of gross
misdemeanor DWI and one count of failing to operate an electric personal assistive




      3
       After Officer Jessen arrested Greenman, he searched Greenman and found the
marijuana.
      4
       Neither party disputes that a Segway is an electric personal assistive mobility
device, as defined in Minnesota Statute § 169.011.26, or that Minnesota Statute
§ 169.212 governs the operation of electric personal assistive mobility devices, as
discussed infra.

                                         -3-
mobility device with due care.5 Hennepin County District Court Judge Denise D.
Reilly found probable cause existed for the arrest.

       On March 16, 2012, Greenman was arrested a third time. This time, Sergeant
Nelson found Greenman lying on a sidewalk next to his Segway. After Greenman
failed field sobriety tests, Sergeant Nelson arrested him for operating his Segway
while intoxicated and for operating it without due care.

       Greenman moved to dismiss the DWI charges stemming from his second arrest.
Judge Reilly dismissed the DWI charges on August 29, 2012, concluding—like Judge
Abrams—that a Segway is not a “motor vehicle” for purposes of the DWI statute.
The charge of failing to operate an electric personal assistive mobility device with due
care remained pending. This time, the City of Medina appealed, and on January 22,
2013, the Minnesota Court of Appeals, in a 2–1 decision, affirmed the district court,
holding, “a Segway is not a motor vehicle within the meaning of the impaired-driving
code.” State v. Greenman, 825 N.W.2d 387, 393 (Minn. Ct. App. 2013). On March
1, 2013, following the Court of Appeals decision, the Hennepin County Attorney6
voluntarily dismissed the charges stemming from Greenman’s third arrest. On June
20, 2013, Greenman pleaded guilty to a petty misdemeanor charge of operating a
Segway on a roadway, in violation of Minnesota Statute § 169.212.2(c), arising from
his second arrest.




      5
        Although the offense was titled “Fail [sic] to Operate Personal Assistive
Mobility Device with Due Care,” the code section referenced in the complaint is
Minnesota Statute § 169.212.2(c), which prohibits the operation of an electric personal
assistive mobility device on a roadway, except under certain conditions. This
inconsistency does not affect our analysis.
      6
          The third prosecution was taken over by the Hennepin County Attorney’s
office.

                                          -4-
       Greenman filed the underlying lawsuit on July 8, 2013. In his § 1983
complaint, Greenman asserted violations of his Fourth and First7 Amendment rights
in connection with all three arrests. He also asserted the second and third arrests
violated his Fourteenth Amendment right to due process and alleged he was arrested
and prosecuted in deliberate disregard of a court order establishing that driving a
Segway while intoxicated is not a crime. He further contended that the police officers
and city prosecutor conspired to deprive him of his rights by arresting and prosecuting
him, and that the City of Medina was liable under § 1983 for failing to properly train
and supervise its police officers.8

       The district court dismissed Greenman’s § 1983 claims, finding that the officers
and prosecutor were entitled to qualified immunity because, at the time of the arrests,
it was not clearly established that Minnesota’s DWI statute did not apply to a person
operating a Segway while intoxicated, and therefore a reasonable officer could have
believed that operating a Segway while intoxicated violated the DWI statute. The
court dismissed the state-law claims without prejudice. Greenman appeals.

                                   II. Discussion

       We review de novo both the grant of a motion to dismiss for failure to state a
claim under Federal Rule of Civil Procedure 12(b)(6) and a motion for judgment on
the pleadings under Federal Rule of Civil Procedure 12(c). Ashley County, Ark. v.
Pfizer, Inc., 552 F.3d 659, 665 (8th Cir. 2009). The grant of either motion is
“appropriate only when there is no dispute as to any material facts and the moving
party is entitled to judgment as a latter of law.” Id. (quotation omitted). A court


      7
        Greenman is an attorney and alleged the arrests and prosecutions were in
retaliation for his representation of a client.
      8
        Greenman also alleged state-law claims of false imprisonment, trespass to
chattel, malicious prosecution, and negligence.

                                         -5-
generally may not consider materials outside the pleadings when deciding a motion
to dismiss for failure to state a claim or for judgment on the pleadings. Porous Media
Corp. v. Pall Corp., 186 F.3d 1077, 1079 (8th Cir. 1999). Courts may, however,
consider “some materials that are part of the public record or do not contradict the
complaint, as well as materials that are necessarily embraced by the pleadings.” Id.
(internal citation and quotation omitted). For example, courts may consider “matters
of public record, orders, items appearing in the record of the case, and exhibits
attached to the complaint.” Id. (quotation omitted). In this case, the district court
considered the underlying state court decisions because they were matters of public
record.9

                         A. Fourth Amendment Violations

        “The doctrine of qualified immunity protects government officials ‘from
liability for civil damages insofar as their conduct does not violate clearly established
statutory or constitutional rights of which a reasonable person would have known.’”
Pearson v. Callahan, 555 U.S. 223, 231 (2009) (quoting Harlow v. Fitzgerald, 457
U.S. 800, 818 (1982)). “We analyze qualified immunity in two steps: (1) whether the
facts that a plaintiff has alleged . . . make out a violation of a constitutional right; and
(2) whether the right at issue was clearly established at the time of [the] defendant’s
alleged misconduct.” Peterson v. Kopp, 754 F.3d 594, 598 (8th Cir. 2014) (alteration
in original) (quotation omitted). Government officials are entitled to qualified
immunity “[u]nless both of these questions are answered affirmatively.” Nord v.
Walsh County, 757 F.3d 734, 738 (8th Cir. 2014). In addition, we are “permitted to



       9
        Greenman expressly states on appeal that he “does not object to consideration
of and cites to the prior state court orders referenced in his Complaint, including those
of Judge Abrams [of the Hennepin County District Court], Judge Reilly [of the
Hennepin County District Court], and the Minnesota Court of Appeals, and other
public records of those underlying proceedings.”

                                            -6-
exercise [our] sound discretion in deciding which of the two prongs of the qualified
immunity analysis should be addressed first.” Pearson, 555 U.S. at 236.

       The district court addressed whether it was clearly established at the time of
Greenman’s arrests that a reasonable police officer would have known that probable
cause did not exist to arrest an intoxicated person operating a Segway for DWI. But
we choose to address the defendants’ alternative argument: that they are entitled to
qualified immunity because there was probable cause, or at least arguable probable
cause, to arrest and prosecute Greenman on all three occasions for operating his
Segway in violation of Minnesota traffic laws other than DWI.10 If the officers had
probable cause to arrest, then Greenman has failed to “make out a violation of a
constitutional right” in the first instance.

       “Probable cause exists when the totality of the circumstances at the time of the
arrest are sufficient to lead a reasonable person to believe that the defendant has
committed or is committing an offense.” Kopp, 754 F.3d at 598 (quotation omitted).
But a police officer need only have “arguable probable cause” to make the arrest in
order to receive qualified immunity. Id. “Arguable probable cause exists even where
an officer mistakenly arrests a suspect believing it is based on probable cause if the
mistake is objectively reasonable.” Id. (quotation omitted). Though the
probable-cause standard allows room for reasonable mistakes by a reasonable person,
the qualified-immunity standard “‘protect[s] all but the plainly incompetent or those
who knowingly violate the law.’” Ulrich v. Pope County, 715 F.3d 1054, 1059 (8th
Cir. 2013) (quoting Hunter v. Bryant, 502 U.S. 224, 229 (1991)).




      10
          Despite the fact that the district court determined the officers and prosecutor
were entitled to qualified immunity based on the second prong, we may affirm the
district court on any basis supported by the record. Guimaraes v. SuperValu, Inc., 674
F.3d 962, 974 (8th Cir. 2012).

                                          -7-
       Under Minnesota law, Greenman had an obligation to operate his Segway with
due care. Minnesota Statute § 169.21211 regulates the operation of electric personal
assistive mobility devices and reads in part as follows:

      (b) No person may operate an electric personal assistive mobility device
      on a roadway, sidewalk, or bicycle path at a rate of speed that is not
      reasonable and prudent under the conditions. Every person operating an
      electric personal assistive mobility device on a roadway, sidewalk, or
      bicycle path is responsible for becoming and remaining aware of the
      actual and potential hazards then existing on the roadway or sidewalk
      and must use due care in operating the device.

Minn. Stat. § 169.212.2(b). Also, a person is not permitted to operate a Segway on
a roadway unless an express exception applies. Minn. Stat. § 169.212.2(c).12 Finally,
though a violation of Chapter 169 is generally a petty misdemeanor, a violation can
be enhanced to a misdemeanor if it is:

      (1) a violation which is committed in a manner or under circumstances
      so as to endanger or be likely to endanger any person or property; or




      11
        Chapter 169 of the Minnesota Statutes sets forth general traffic regulations.
      12
        The exceptions are as follows:

      (1) while making a direct crossing of a roadway in a marked or unmarked
      crosswalk;
      (2) where no sidewalk is available;
      (3) where a sidewalk is so obstructed as to prevent safe use;
      (4) when so directed by a traffic-control device or by a peace officer; or
      (5) temporarily in order to gain access to a motor vehicle.

Minn. Stat. § 169.212.2(c).

                                         -8-
      (2) exclusive of violations relating to the standing or parking of an
      unattended vehicle, a violation of any of the provisions of this chapter,
      classified therein as a petty misdemeanor, when preceded by two or more
      petty misdemeanor convictions within the immediate preceding 12-
      month period . . . .

Minn. Stat. § 169.89.1.

       According to Greenman’s complaint, at the time of the first arrest, Greenman
was operating his Segway on a roadway in Medina. In addition, the record shows that
this arrest occurred after sunset,13 and Greenman does not dispute his Segway did not
have a headlight or any other lights for safety purposes. Under these circumstances,
Officer Jessen had probable cause to arrest Greenman based on a reasonable belief
that Greenman was violating Minnesota traffic laws in two ways: by operating his
Segway on a roadway, and by operating his Segway without taking due care to ensure
it was sufficiently visible in the dark. He also had, at a minimum, arguable probable
cause to conclude that the violation was “committed in a manner or under
circumstances so as to endanger or be likely to endanger any person or property.”
Minn. Stat. § 169.89.1(1). While operating a Segway in the roadway, after dark, and
without lights, Greenman arguably placed himself in danger of harm from passing
vehicles.

       According to Greenman’s complaint, at the time of the second arrest, Greenman
was again operating his Segway on a roadway in Medina. As described in Judge
Reilly’s order granting Greenman’s motion to dismiss, Officer Jessen saw Greenman
cross the center line of the road twice; and when he approached Greenman, the officer
smelled alcohol, saw Greenman’s eyes were bloodshot and watery, and noted


      13
         According to Greenman’s complaint, he was stopped shortly before 9:00 p.m.,
and according to Judge Abrams’s order dismissing the DWI charges stemming from
the first arrest, the stop occurred after sunset.

                                         -9-
Greenman was “unstable on his feet.”14 Under these circumstances, too, Officer
Jessen had probable cause to believe Greenman was unlawfully operating his Segway
on a roadway and had at least arguable probable cause to believe Greenman was
operating his Segway without due care. And as with the first arrest, Officer Jessen
had reason to believe these violations were “committed in a manner or under
circumstances so as to endanger or be likely to endanger” Greenman. Though the
DWI charges associated with this arrest were dismissed, Greenman ultimately pleaded
guilty to operating his Segway on a roadway.

       Greenman counters that even if Officer Jessen had probable cause to arrest him
for traffic violations, the second arrest was really for operating his Segway while
impaired, for which Officer Jessen knew he did not have probable cause to arrest him.
But even if Officer Jessen cited a different offense when he arrested Greenman,
“probable cause for the arrest still exist[ed] as long as the facts known to the officer
would provide probable cause to arrest for the violation of some other law.” United
States v. Demilia, 771 F.3d 1051, 1054 (8th Cir. 2014). “In other words, an ‘arresting
officer’s state of mind (except for the facts that he knows) is irrelevant to the existence
of probable cause.’” Id. (quoting Devenpeck v. Alford, 543 U.S. 146, 153 (2004)).
“[His] subjective reason for making the arrest need not be the criminal offense as to
which the known facts provide probable cause.” Id. (quotation omitted). Officer
Jessen had probable cause to arrest Greenman both the first and second times
Greenman was operating his Segway on a roadway. Accordingly, we conclude all
three police officers—Officer Jessen, Sergeant Nelson, and Chief Belland—are
entitled to qualified immunity in connection with both the August 17, 2010, and the
February 4, 2012, arrests.



      14
         In the memorandum opinion, Judge Reilly noted that “[t]he State accepted
[Greenman’s] recitation of facts in his opening brief as accurate.” We understand this
to mean the parties agreed to the underlying facts and Judge Reilly relied on the facts
as stated by Greenman. In other words, we take these facts to be undisputed.

                                           -10-
       Regarding the third and final arrest, Greenman contends Sergeant Nelson did
not have probable cause to believe that Greenman was operating a Segway without
due care because Sergeant Nelson did not actually observe him driving the Segway
but instead found him lying on the sidewalk next to his Segway shortly after 8:00 p.m.
Greenman asserts the evidence supported his explanation that a “crater” in the
sidewalk, rather than his lack of due care, caused the crash.

       Even if Greenman is correct that a fault in the sidewalk caused him to crash his
Segway, the statute requires, “[e]very person operating an electric personal assistive
mobility device on a . . . sidewalk . . . [to be] responsible for becoming and remaining
aware of the actual and potential hazards then existing on the . . . sidewalk and [to] use
due care in operating the device.” See Minn. Stat. § 169.212. 2(b). That Greenman
failed field sobriety tests after being found on the sidewalk only adds to the “totality
of circumstances” that would lead a reasonable person to determine Greenman was
not operating his Segway with due care prior to crashing. See Kopp, 754 F.3d at 598
(quotation omitted). Sergeant Nelson had at least arguable probable cause to arrest
Greenman for failing to operate his Segway with due care.15

        Finally, Greenman argues Tallen, the attorney who prosecuted him on behalf
of Medina, should be held liable for the second and third prosecutions because he
advised the officers to continue to arrest Greenman for DWI after having personally
litigated this issue and lost. “[G]iving legal advice to police during an investigation
strips a prosecutor of absolute immunity for that act because it is not a normal part of

      15
         In his opening brief, Greenman states “[t]he district court also dismissed
Appellant’s municipal liability claims on the grounds that the individual Appellees
were not liable for any unconstitutional acts. When Appellant’s constitutional claims
are reinstated, he must be able to pursue his claims for municipal liability.” But
Greenman does not assert an issue for review as to municipal liability nor does he
offer an independent basis for the City of Medina to be held liable. “Claims not raised
in an opening brief are deemed waived.” Jenkins v. Winter, 540 F.3d 742, 751 (8th
Cir. 2008).

                                          -11-
prosecutions.” Anderson v. Larson, 327 F.3d 762, 769 (8th Cir. 2003). While Tallen
is not entitled to absolute immunity for providing legal advice during a police
investigation, “the doctrine of qualified immunity remains available to him for that
act,” just as it is available to the three Medina police officers. Id. We have concluded,
however, that the officers had probable cause to arrest Greenman for traffic violations
other than DWI. Therefore, even if Tallen advised the officers as Greenman alleges,
the arrests were supported by probable cause; Tallen, therefore, is entitled to qualified
immunity.

                             B. Due Process Violations

       Greenman next argues the second and third arrests and prosecutions violated
his Fourteenth Amendment right to substantive due process because after the charges
from his first arrest were dismissed, he had a constitutional expectation the Medina
officers would not arrest and prosecute him again for DWI while operating a Segway.
In other words, Greenman asserts a substantive due-process claim based on allegations
of arrest and prosecution without probable cause. “Where a particular [constitutional]
amendment provides an explicit textual source of constitutional protection against a
particular sort of government behavior, that Amendment, not the more generalized
notion of substantive due process, must be the guide for analyzing these claims.”
Smithson v. Aldrich, 235 F.3d 1058, 1064 (8th Cir. 2000) (quoting Albright v. Oliver,
510 U.S. 266, 273 (1994)). Greenman’s due-process claim alleges he was arrested
and prosecuted without probable cause. This type of claim is properly addressed
under a Fourth Amendment analysis. Id., at 1065. Having undergone the Fourth
Amendment analysis in the preceding section, we conclude Greenman’s due-process
claims fail.




                                          -12-
                          C. First Amendment Violations

       Greenman next asserts Officer Jessen arrested him in retaliation for engaging
in protected speech, that is, for representing a client in an adverse court proceeding,
thereby violating his First Amendment rights. “[T]he law is settled that as a general
matter the First Amendment prohibits government officials from subjecting an
individual to retaliatory actions . . . for speaking out.” Kopp, 754 F.3d at 602
(quotation omitted). To prevail in an action for First Amendment retaliation,
Greenman must show, “(1) he engaged in a protected activity, (2) the government
official took adverse action against him that would chill a person of ordinary firmness
from continuing in the activity, and (3) the adverse action was motivated at least in
part by the exercise of the protected activity.” Id. “In retaliatory arrest cases, we have
identified a fourth prong: lack of probable cause or arguable probable cause.” Id.
Because we conclude there was probable cause for each of the three arrests, we agree
with the district court that the officers and prosecutor are entitled to qualified
immunity on Greenman’s First Amendment retaliatory-arrest claims.

                       D. Declaratory and Injunctive Relief

       Greenman argues the district court erred by dismissing all of his federal
constitutional claims without considering his claims for declaratory or injunctive
relief. Greenman asked the district court to issue an order prohibiting Medina from
again arresting him for operating his Segway while intoxicated. “The exercise of
judicial power under Art. III of the Constitution depends on the existence of a case or
controversy.” Preiser v. Newkirk, 422 U.S. 395, 401 (1975). “When a case on appeal
no longer presents an actual, ongoing case or controversy, the case is moot and the
federal court no longer has jurisdiction to hear it.” Neighborhood Transp. Network,
Inc. v. Pena, 42 F.3d 1169, 1172 (8th Cir. 1994). “[A] federal court has neither the
power to render advisory opinions nor ‘to decide questions that cannot affect the
rights of litigants in the case before them.’” Preiser, 422 U.S. at 401 (quoting North

                                          -13-
Carolina v. Rice, 404 U.S. 244, 246 (1971). “Because the test to determine the
existence of a ‘substantial controversy’ is imprecise, the decision of whether such
controversy exists is made upon the facts on a case by case basis.” Marine Equip.
Mgmt. Co. v. United States, 4 F.3d 643, 646 (8th Cir. 1993) (quoting Golden v.
Zwickler, 394 U.S. 103, 108 (1969)).

      The City and police officers assert Greenman’s request for declaratory relief is
moot because there is no longer an actual case or controversy. We agree. The
Minnesota Court of Appeals has concluded that operating a Segway while intoxicated
does not violate Minnesota’s DWI statute. Following this decision, the Hennepin
County Attorney’s Office dismissed the pending DWI charges stemming from
Greenman’s third arrest, and no other charges remain pending against Greenman.
Because we conclude Greenman’s request for injunctive and declaratory relief has
become moot, we no longer have jurisdiction to hear it. Id.16

                                  III. Conclusion

      For the reasons set forth above, we affirm the judgment of the district court
dismissing Greenman’s complaint.
                      ______________________________




      16
         We likewise conclude the district court did not abuse its discretion in
declining to exercise supplemental jurisdiction over Greenman’s state-law claims. See
Johnson v. City of Shorewood, Minn., 360 F.3d 810, 819 (8th Cir. 2004) (“A federal
district court has the discretionary power to decline jurisdiction where it has
‘dismissed all claims over which it has original jurisdiction.’” (quoting 28 U.S.C.
§ 1367(c)(3))).

                                        -14-
