                    FOR PUBLICATION
  UNITED STATES COURT OF APPEALS
       FOR THE NINTH CIRCUIT

NADEEM HASSAN,                            
                Plaintiff-Appellant,
                 v.                              No. 06-17252
MICHAEL CHERTOFF, Secretary of                     D.C. No.
Department of Homeland Security;              CV-04-02251-PHX-
AL GALLMANN, Acting District                         FJM
Director, Phoenix District Office,
                                                   OPINION
Citizenship and Immigration
Service,
             Defendants-Appellees.
                                          
         Appeal from the United States District Court
                  for the District of Arizona
        Frederick J. Martone, District Judge, Presiding

                    Argued and Submitted
           June 13, 2008—San Francisco, California

                    Filed September 11, 2008

   Before: Mary M. Schroeder, John M. Walker, Jr.,* and
             N. Randy Smith, Circuit Judges.

                       Per Curiam Opinion




  *The Honorable John M. Walker, Jr., Senior U.S. Circuit Judge for the
Second Circuit, sitting by designation.

                                12719
                    HASSAN v. CHERTOFF              12721


                       COUNSEL

Eric G. Bjotvedt, Esq., Phoenix, Arizona, for plaintiff/
appellant, Nadeem Hassan.

Thomas H. Dupree, Jr., Esq. USDOJ, Washington, D.C., for
defendants/appellees, Michael Chertoff, Secretary of Home-
land Security et al.
12722                 HASSAN v. CHERTOFF
                          OPINION

PER CURIAM:

   Nadeem Hassan, a citizen of Pakistan, appeals the district
court’s dismissal of his complaint seeking mandamus relief
and challenging the government’s denial of his application for
adjustment of status and cancellation of his permission to
return to this country. We lack jurisdiction to review the gov-
ernment’s actions and affirm the district court’s dismissal. See
8 U.S.C. § 1252(a)(2)(B)(i)-(ii).

                         Background

  In January 2002, while physically present in the United
States, Hassan applied for adjustment of status to lawful per-
manent resident pursuant to section 245 of the Immigration
and Nationality Act (“INA”), 8 U.S.C. § 1255(a). In October
2004, the government had not yet acted on his application, so
he filed this mandamus action in the United States District
Court to compel the government to act on the application. In
2005, the government questioned him about possible ties to a
group the government suspected of having links to terrorists.

   While his adjustment application was still pending, Hassan
traveled outside the United States to Saudi Arabia. He
received a travel document from the government, Form I-512,
commonly referred to as an “advance parole.” It granted him
permission to return to the United States, so long as his appli-
cation for adjustment remained pending. While Hassan was
abroad, the government denied his adjustment application and
revoked the advance parole. When he attempted to return to
the United States, he was denied admission, placed in expe-
dited removal proceedings, and removed. He then amended
his complaint in this action to challenge the denial of status
adjustment and revocation of advance parole.

  The district court held that under the REAL ID Act of
2005, 8 U.S.C. § 1252(a)(2)(B), both the denial of the adjust-
                      HASSAN v. CHERTOFF                   12723
ment of status and the revocation of the advance parole were
discretionary decisions that the court lacked jurisdiction to
review. The statute the court relied upon with respect to
adjustment of status provides that “no court shall have juris-
diction to review any judgment regarding the granting of
relief under section . . . 1255 of this title . . . .” 8 U.S.C.
§ 1252(a)(2)(B)(i). The statute the district court relied on to
determine that it lacked jurisdiction to review the revocation
of advance parole is 8 U.S.C. § 1252(a)(2)(B)(ii), which pro-
vides that “no court shall have jurisdiction to review any other
decision . . . of the Attorney General or the Secretary of
Homeland Security the authority for which is specified under
this subchapter to be in the discretion of the Attorney General
or the Secretary of Homeland Security . . . .”

                           Analysis

   [1] Hassan argued to the district court that before the gov-
ernment denied his application for adjustment of status, it
should, under an applicable regulation, have given him an
opportunity to respond to the reasons for the denial. See 8
C.F.R. § 103.2(b)(16)(i). But, as the district court noted, judi-
cial review of the denial of an adjustment of status application
— a decision governed by 8 U.S.C. § 1255 — is expressly
precluded by 8 U.S.C. § 1252(a)(2)(B)(i). Furthermore,
§ 1252(a)(2)(B)(ii) precludes judicial review of “any other
[discretionary] decision or action of the Attorney General or
the Secretary of Homeland Security.” Because the govern-
ment denied Hassan’s application for adjustment, in part, as
a matter of discretion, the district court lacked jurisdiction to
review that claim. Cf. Hosseini v. Gonzales, 464 F.3d 1018,
1021 (9th Cir. 2006) (“We lack jurisdiction to review the
BIA’s denial of Hosseini’s adjustment of status claim because
the BIA alternatively denied relief as a matter of discretion.”).

  [2] To the extent that Hassan argues that he is not appealing
a discretionary decision to deny his application but is raising
a constitutional claim or question of law as to whether the
12724                 HASSAN v. CHERTOFF
government violated their own regulation and Hassan’s due
process rights, we reject that argument. Although 8 U.S.C.
§ 1252(a)(2)(D) preserves jurisdiction over “constitutional
claims or questions of law raised upon a petition for review
filed with an appropriate court of appeals in accordance with
this section,” that provision is inapplicable here. Hassan’s
challenge to the denial of adjustment was not raised upon a
petition for review filed with this court; his case comes to us
on direct appeal from the district court. We therefore conclude
that the district court did not have jurisdiction to entertain
Hassan’s challenge to the denial of adjustment of status.

    The only remaining question pertains to the revocation of
Hassan’s advance parole. The district court ruled that it lacked
jurisdiction to consider the issue because the revocation of
advance parole, like the grant of advance parole, is discretion-
ary. See 8 U.S.C. § 1182(d)(5)(A) (stating that the Attorney
General may “in his discretion parole into the United States
. . . any alien”); see also Samirah v. O’Connell, 335 F.3d 545,
548 (7th Cir. 2003) (“The Attorney General . . . has the dis-
cretion to revoke advance parole after it has been granted.”).

   [3] On appeal, Hassan argues that the district court had
jurisdiction to review the revocation. He claims that the gov-
ernment lacked any discretion to revoke his advance parole
because no statute or regulation expressly authorizes revoca-
tion. We disagree. The statutory and regulatory provisions
governing the grant of parole provide for the revocation of
parole when it no longer serves its purpose. See 8 U.S.C.
§ 1182(d)(5)(A) (“[W]hen the purpose of such parole shall, in
the opinion, of the Attorney General, have been served the
alien shall forthwith return or be returned to the custody from
which he was paroled and thereafter his case shall continue to
be dealt with in the same manner as that of any other appli-
cant for admission to the United States.”); 8 C.F.R.
§ 212.5(e)(2)(i) (providing that DHS “shall” terminate parole
“upon accomplishment of the purpose for which parole was
authorized or when in the opinion of [certain enumerated
                     HASSAN v. CHERTOFF                  12725
DHS officials], neither humanitarian reasons nor public bene-
fit warrants the continued presence of the alien in the United
States”); see also Samirah, 335 F.3d at 548 (interpreting these
provisions as granting DHS authority to revoke advance
parole).

   [4] DHS complied with these regulations when it revoked
Hassan’s advance parole. It is undisputed that Hassan was
granted advance parole solely to allow him to return to this
country while his application for status adjustment was pend-
ing. Thus, once Hassan’s application for adjustment of status
was denied, he was no longer eligible for advance parole. See
U.S. Citizenship & Immigration Servs., Dep’t of Homeland
Sec., Adjudicator’s Field Manual § 54.3 (2008) (providing
that an applicant for adjustment of status is eligible for
advance parole only if his application has not yet been
decided). The revocation inevitably followed from DHS’s dis-
cretionary decision to deny the adjustment of status. Under
these circumstances, DHS was required by its own regulation
to terminate the advance parole, the parole having served its
purpose. See 8 C.F.R. § 212.5(e)(2)(i).

   The district court properly rejected Hassan’s argument that
it had jurisdiction to review the revocation of advance parole
as an ultra vires. The revocation was lawfully authorized.

   For the foregoing reasons, we lack jurisdiction to review
the government actions challenged by Hassan. We therefore
affirm the district court’s dismissal of his case.

  AFFIRMED.
