                    FOR PUBLICATION
  UNITED STATES COURT OF APPEALS
       FOR THE NINTH CIRCUIT

UNITED STATES OF AMERICA,                       No. 03-35594
                Plaintiff-Appellee,                D.C. Nos.
               v.                             CV-02-00140-RHW
JOSE MARIA SANDOVAL-LOPEZ,                     CR-00-2083-RHW
             Defendant-Appellant.
                                                  OPINION

         Appeal from the United States District Court
           for the Eastern District of Washington
         Robert H. Whaley, District Judge, Presiding

                   Submitted August 4, 2004*
                      Seattle, Washington

                        Filed June 6, 2005

  Before: Cynthia Holcomb Hall, Andrew J. Kleinfeld, and
           Consuelo M. Callahan, Circuit Judges.

                   Opinion by Judge Kleinfeld




  *This panel unanimously finds this case suitable for decision without
oral argument. See Fed. R. App. P. 34(a)(2).

                                6273
            UNITED STATES v. SANDOVAL-LOPEZ       6275


                     COUNSEL

Anne Walstrom, Federal Defenders of Eastern Washington
and Idaho, Yakima, Washington, for the appellant.

Gregory M. Shogren, Assistant U.S. Attorney, Yakima,
Washington, for the appellee.
6276             UNITED STATES v. SANDOVAL-LOPEZ
                             OPINION

KLEINFELD, Circuit Judge:

   This case involves a petition for a writ of habeas corpus by
a prisoner who claims that his lawyer rendered him ineffec-
tive assistance by failing to file a notice of appeal.

                                Facts

   Sandoval-Lopez was caught in Yakima, Washington, with
fifteen pounds of heroin hidden in the manifold of his pickup
truck. He had told a man who helped him with the mechanical
work, and who turned out to be an undercover informant, that
he regularly smuggled heroin in his truck from Mexico, for
distribution in Washington and Oregon.

   Though he was indicted for possession with the intent to
distribute this very large quantity of heroin, his lawyer
worked out a plea bargain — only seven years to serve for
misprison of felony1 and use of a communication facility to
facilitate the distribution of a controlled substance.2 Through
this deal, defense counsel managed to obtain a remarkably
favorable agreement to plead to a superseding information
with statutory maximums of four and three years respectively,3
thereby avoiding the risk of a much longer sentence for pos-
session with intent to distribute.

   In his written plea agreement, Sandoval-Lopez waived his
right to appeal. The agreement stated: “The defendant agrees
not to appeal his convictions and any sentences imposed in
accordance with this plea agreement.” Sandoval-Lopez, his
lawyer, and an interpreter all signed the plea agreement.
  1
    18 U.S.C. § 4.
  2
    21 U.S.C. § 843(b).
  3
    See 18 U.S.C. § 4 (maximum penalty of three years imprisonment); 21
U.S.C. § 843(d) (maximum penalty of four years imprisonment).
                UNITED STATES v. SANDOVAL-LOPEZ               6277
   At the colloquy, when Sandoval-Lopez changed his plea to
guilty, the district judge painstakingly obtained express assur-
ances, on the record, from Sandoval-Lopez that he had talked
with his lawyer about waiving his right to appeal, understood
what waiving entailed, and intended to do so. The judge care-
fully explained to Sandoval-Lopez that after trial he would
have the right to appeal, to have counsel appointed at no cost
to him if he could not afford counsel, and to have all neces-
sary papers and transcripts provided to him at no cost if he
could not afford it. The judge then obtained Sandoval-Lopez’s
assurance that he understood his right to appeal, and that he
would lose this right if he pleaded guilty. The judge explained
to him that “this agreement provides that you agree not to
appeal your convictions and any sentences imposed in accor-
dance with this plea agreement,” and Sandoval-Lopez said he
understood that. The judge did not leave it at that, explaining
further, “that’s a very important right that you are giving up,”
and asking whether Sandoval-Lopez had “fully discussed”
giving up his right to appeal with his lawyer. Sandoval-Lopez
assured the judge that he had. Even that was not the end of
the inquiry. The judge asked defense counsel whether he
thought Sandoval-Lopez understood that he was giving up his
right to appeal, and whether Sandoval-Lopez wanted to do so.
Sandoval-Lopez’s lawyer responded affirmatively to both
questions.

   A different judge conducted the sentencing, and although
the sentence was precisely what Sandoval-Lopez had agreed
to in the plea agreement, the sentencing judge said, “You have
a right to appeal this sentence. If you don’t appeal it within
ten days, you lose that right.” No appeal was filed, however,
and nothing else happened for a year.

   So far, this is about as solid a waiver of the right to appeal
as can be imagined. After a year, however, Sandoval-Lopez
alleged for the first time, in a petition for a writ of habeas cor-
pus, that he had wanted to appeal. His petition urged many
defects involving ineffective assistance of counsel, including
6278             UNITED STATES v. SANDOVAL-LOPEZ
that his lawyer did not tell him that the evidence was insuffi-
cient, did not argue for an aberrant behavior departure, and
did not sufficiently advise him that accepting the plea could
lead to deportation. In response to the question of whether he
had appealed, Sandoval-Lopez wrote that “counsel refused to
file,” and that the conviction resulted from “prosecutor vin-
dictiveness to set me up” instead of evidence:

      Counsel failed to submit a notice of appeal. I asked
      him to but he never did and I did not discover this
      until the 10 day deadline was up — I do not under-
      stand English and had to find someone to interpret
      for me. By then I had ran out of time to file.

The district court denied the petition without an evidentiary
hearing, and we granted a certificate of appealability limited
to the question of whether defense counsel rendered ineffec-
tive assistance in violation of the Sixth Amendment by failing
to file a notice of appeal.

                              Analysis

   Appellate counsel for Sandoval-Lopez makes a single argu-
ment, that the district court erred by denying him an evidenti-
ary hearing because the record did not conclusively establish
that he was not entitled to relief. We review denial of a peti-
tion for a writ of habeas corpus de novo,4 and review denial
of an evidentiary hearing for abuse of discretion.5

   [1] The Supreme Court in Roe v. Flores-Ortega6 laid out
the “proper framework for evaluating an ineffective assistance
of counsel claim, based on counsel’s failure to file a notice of
appeal without respondent’s consent.”7 In Flores-Ortega, the
  4
    United States v. Rodrigues, 347 F.3d 818, 823 (9th Cir. 2003).
  5
    Id.
  6
    Roe v. Flores-Ortega, 528 U.S. 470 (2000).
  7
    Id. at 473.
                  UNITED STATES v. SANDOVAL-LOPEZ                     6279
district court conducted an evidentiary hearing.8 The district
court found that the defendant neither asked his lawyer to file
a notice of appeal, nor consented to her not filing one.9 They
had not discussed it.10 The Supreme Court rejected the Ninth
Circuit’s rule that “[c]ounsel must file a notice of appeal
unless the defendant specifically instructs otherwise.”11

   [2] The framework imposed by the Court for determining
whether there was ineffective assistance of counsel was (1)
ask whether counsel consulted with the defendant about an
appeal; (2) if not, was failure to consult deficient performance.12
Rejecting the Ninth Circuit rule then in effect,13 the Court held
that the answer to the second question is not always “yes.”
The Court held that the deficient performance prong of Strick-
land v. Washington14 is satisfied in failure to consult cases
where “there is reason to think either (1) that a rational defen-
dant would want to appeal (for example, because there are
nonfrivolous grounds for appeal), or (2) that this particular
defendant reasonably demonstrated to counsel that he was
interested in appealing.”15 For the “would want to appeal”
branch, a “highly relevant factor” in determining whether a
rational defendant would want to appeal is whether the plea
was entered pursuant to a plea agreement, whether the defen-
dant had been sentenced in accord with his agreement, and
whether the plea agreement waived or reserved the right to
appeal.
  8
   Id. at 474.
  9
   Id. at 475.
  10
     Id.
  11
     Id. at 478.
  12
     Id.
  13
     See United States v. Stearns, 68 F.3d 328 (1995) (holding that a defen-
dant need only show that he did not consent to his counsel’s failure to file
an appeal for it to be ineffective assistance of counsel).
  14
     Strickland v. Washington, 466 U.S. 668, 688 (1994).
  15
     Flores-Ortega, 528 U.S. at 480.
6280              UNITED STATES v. SANDOVAL-LOPEZ
   [3] The Supreme Court also rejected the Ninth Circuit’s per
se rule on the prejudice prong of Strickland. The Court held
that to show prejudice, the defendant “must demonstrate that
there is a reasonable probability that, but for counsel’s defi-
cient failure to consult with him about an appeal, he would
have timely appealed.”16 Prejudice does not require that the
defendant show that he had meritorious grounds for appeal,
but “evidence that there were nonfrivolous grounds for appeal
or that the defendant in question promptly expressed a desire
to appeal will often be highly relevant in making”17 the deter-
mination whether there is a reasonable probability that the
defendant would have appealed. Thus, the defendant does not
have to show that he might have prevailed on appeal to show
prejudice, just that he probably would have appealed had his
lawyer asked.

   The Flores-Ortega framework helps with our case, but
does not dispose of it. Had the district court held an evidenti-
ary hearing, and had the court found that Sandoval-Lopez was
lying when he said in his petition that his lawyer “refused” to
appeal, then Flores-Ortega might be directly on point. In the
hypothetical scenario where Sandoval-Lopez never expressed
any desire to appeal, Flores-Ortega would completely fore-
close an ineffective assistance of counsel claim. In such a sce-
nario, because there was no ground for appeal, as an appeal
had been waived, and he had obtained the benefit of his very
favorable plea bargain, no rational defendant would want to
appeal. So Sandoval-Lopez’s lawyer’s failure to file a notice
of appeal would not be deficient performance, if he and his
client did not consult about an appeal.

  [4] Because the district court did not hold an evidentiary
hearing, however, we have to assume, for purposes of our
analysis, that after sentencing Sandoval-Lopez asked his law-
yer to appeal and his lawyer did not do as he asked. He claims
  16
    Id. at 484.
  17
    Id. at 485.
               UNITED STATES v. SANDOVAL-LOPEZ               6281
that he “asked him to” and his lawyer “refused.” As contrary
to common sense as it seems, we are compelled by the law to
reverse the district court.

   This result is troubling. The record establishes that, prior to
the time Sandoval-Lopez claims he told his lawyer to appeal,
the following had occurred: (1) Sandoval-Lopez and his law-
yer had consulted about whether Sandoval-Lopez should
waive his right to appeal in order to get the seven-year deal
despite his being caught with fifteen pounds of heroin; (2)
Sandoval-Lopez had, with full understanding, agreed in writ-
ing to waive his right to appeal; (3) the district judge had
explained to Sandoval-Lopez that he had a right to appeal,
and could do so at no expense to himself for counsel or
papers; and (4) Sandoval-Lopez had orally reiterated his
choice to waive this right in open court. Moreover, upon a
careful review of Sandoval-Lopez’s habeas petition and
appellate brief, we see that (1) Sandoval-Lopez has not, in his
petition, his counseled brief, or anywhere else, identified any
nonfrivolous ground for a direct appeal; (2) Sandoval-Lopez
does not tell us in his counseled brief what he might have
appealed; and (3) Sandoval-Lopez waited over a year to file
his petition claiming that he had wanted to appeal.

   An appeal would most probably have been dismissed
because it had been waived. Had it not been dismissed, we are
in the dark about how Sandoval-Lopez could have prevailed.
And, if he were to prevail and get a new trial on his original
indictment for possession of heroin for purposes of distribu-
tion, his odds seem high of spending much more time in the
federal penitentiary than the seven years his lawyer worked
out for him. So, supposing that he is telling the truth and his
lawyer simply refused when he said “I want to appeal,” he
was probably lucky to have a lawyer who exercised such wise
judgment. Sometimes demanding that one’s lawyer appeal is
like demanding that one’s doctor perform surgery, when the
surgery is risky and has an extremely low likelihood of
improving the patient’s condition.
6282             UNITED STATES v. SANDOVAL-LOPEZ
   [5] But even though no one would think a doctor incompe-
tent for refusing to perform unwise and dangerous surgery,
the law is that “a lawyer who disregards specific instructions
from the defendant to file a notice of appeal acts in a manner
that is professionally unreasonable.”18 Indeed, in United States
v. Peguero,19 the Supreme Court summarized its previous
holding in Rodriquez v. United States20 as “when counsel fails
to file a requested appeal, a defendant is entitled to resentenc-
ing and to an appeal without showing that his appeal would
likely have had merit.”21 This proposition may amount to say-
ing “it is ineffective assistance of counsel to refuse to file a
notice of appeal when your client tells you to, even if doing
so would be contrary to the plea agreement and harmful to
your client,” but that is the law on filing a notice of appeal.

   [6] This proposition of law controls both the deficient per-
formance prong of Strickland and the prejudice prong. If, as
Sandoval-Lopez claims, it is true that he explicitly told his
lawyer to appeal his case and his lawyer refused, then we are
required by Flores-Ortega to conclude that it was deficient
performance not to appeal and that Sandoval-Lopez was prej-
udiced. The prejudice in failure to file a notice of appeal cases
is that the defendant lost his chance to file the appeal, not that
he lost a favorable result that he would have obtained by
appeal.

   Mere expression of interest in appealing would not lead to
the same result as telling defense counsel to appeal. The
Supreme Court recognized that

       while the performance and prejudice prongs may
       overlap, they are not in all cases coextensive. To
       prove deficient performance, a defendant can rely on
  18
     Flores-Ortega, 528 U.S. at 477.
  19
     United States v. Peguero, 526 U.S. 23 (1999).
  20
     Rodriquez v. United States, 395 U.S. 327 (1969).
  21
     Peguero, 526 U.S. at 28 (citing Rodriquez, 395 U.S. at 329-30).
                 UNITED STATES v. SANDOVAL-LOPEZ                6283
       evidence that he sufficiently demonstrated to counsel
       his interest in an appeal. But such evidence alone is
       insufficient to establish, that had the defendant
       received reasonable advice from counsel about the
       appeal, he would have instructed his counsel to file
       an appeal.22

Taking Sandoval-Lopez’s allegations as true, however, he did
not merely demonstrate to counsel his interest in an appeal, he
explicitly told his lawyer he wanted to appeal and his lawyer
refused to do so. The situation addressed by this language in
Flores-Ortega is one where a defendant expresses some inter-
est in appealing but would have been talked out of it if his
counsel had explained the unwisdom of such a decision.
Sandoval-Lopez, on the other hand, says he explicitly asked
his lawyer to file an appeal and his lawyer refused. Prejudice
exists because, but for his lawyer’s refusal, Sandoval-Lopez
would have appealed.

   [7] The government argues that Sandoval-Lopez is not enti-
tled to an evidentiary hearing because he does not “ ‘allege
specific facts, which if true, would entitle him to relief.’ ”23
Pro se habeas petitioners cannot be held to the same standard
as petitioners represented by counsel.24 Proceeding pro se, or
only with the assistance of a jailhouse lawyer, Sandoval-
Lopez’s allegation is specific enough. He claims he asked his
lawyer to file an appeal and his lawyer refused. The evidenti-
ary hearing will determine whether this claim by Sandoval-
Lopez is true or false, whether it is true but was followed by
consultation and withdrawal of the request, etc.

  [8] We are compelled to conclude that the district court
needs to hold an evidentiary hearing to determine whether
  22
     Flores-Ortega, 528 U.S. at 486.
  23
     Rodriguez, 347 F.3d at 824 (quoting United States v. McMullen, 98
F.3d 1155, 1159 (9th Cir. 1996)).
  24
     Corjasso v. Ayers, 278 F.3d 874, 878 (9th Cir. 2002).
6284             UNITED STATES v. SANDOVAL-LOPEZ
Sandoval-Lopez really did tell his lawyer to appeal and his
lawyer refused though Sandoval-Lopez demanded it. If not,
Sandoval-Lopez is entitled to no further relief. If so, then the
district court, under controlling circuit authority, must vacate
and reenter the judgment so that Sandoval-Lopez can file a
timely notice of appeal.25
   Alternatively, the government may choose not to oppose
Sandoval-Lopez’s petition and to let him appeal. The govern-
ment might choose this alternative to free itself from the
restraint of the plea bargain, or because getting the appeal dis-
missed would be less work than an evidentiary hearing.
   If a defendant, even one who has expressly waived his right
to appeal, files a habeas petition after sentencing and judg-
ment claiming that he ordered his attorney to appeal and his
attorney refused to do so, two things can happen. The district
court can hold an evidentiary hearing to decide whether peti-
tioner’s allegation is true, and if it is, vacate and reenter the
judgment, allowing the appeal to proceed. Or, if the state does
not object, the district court can vacate and reenter the judg-
ment without a hearing and allow the appeal to proceed,
assuming without deciding that the petitioner’s claim is true.
The case at bar is a particularly plain instance of where “inef-
fective assistance of counsel” is a term of art that does not
mean incompetence of counsel. It may be very foolish to risk
losing a seven-year plea bargain on an appeal almost sure to
go nowhere, in a major heroin case. Nevertheless the client
has the constitutional right, under Flores-Ortega and
Peguero, to bet on the possibility of winning the appeal and
then winning an acquittal, just as a poker player has the right
to hold the ten and queen of hearts, discard three aces, and
pray that when he draws three cards, he gets a royal flush.
   REVERSED.
  25
    See United States v. Gaither, 245 F.3d 1064, 1068 (9th Cir. 2001); see
also United States v. Pearce, 992 F.2d 1021, 1023 (9th Cir. 1993).
