PER CURIAM:
Leroy Williams appeals from denial of federal habeas corpus relief. 28 U.S.C. § 2254. Finding no deprivation of constitutional rights, we affirm.
Appellant was charged with escape from a Florida correctional institution, tried and convicted in the state courts of Florida. The conviction was reversed and the matter remanded for a new trial due to violation of appellant’s right to assistance of counsel. Williams v. State, 337 So.2d 846 (Fla. 2nd DCA 1976). Prior to retrial appellant filed a motion for psychiatric examination. A court-appointed psychiatrist, applying the M’Naughten test of insanity, which is applicable in Florida, concluded appellant was sane at the time of the crime. Appellant thereafter filed a notice of intent to rely upon an insanity defense and a statement of particulars providing the basis for the defense of insanity.
At request of appellant’s counsel, a pretrial hearing was held to determine whether the defendant would be allowed to raise the insanity defense at trial. The state trial court heard arguments, applied the M’Naughten test of whether or not the defendant knew right from wrong at the time of the crime, and concluded that there was no substantial evidence tending to show appellant was insane at the time of the crime. Cf. Griffin v. State, 96 So.2d 424, 425 (Fla. 3rd DCA 1957). The court therefore refused to appoint additional psychiatrists to examine appellant, ordered that the insanity defense be struck, but specifically ruled that no limitation would be placed on defendant’s right to produce evidence of absence of the requisite criminal intent.
Appellant then entered a plea of nolo contendere, reserving the right to appeal on the issue of the insanity defense. The judgment of guilt was affirmed without -written opinion. Williams v. State, 358 So.2d 1198 (Fla. DCA 1978). Appellant next filed a petition for federal habeas corpus relief. Based on the report and recommendation of the federal magistrate, the district court denied the petition.
Appellant does not contend that Florida’s use of the M'Naughten definition of insanity is unconstitutional; nor does he challenge the presumption of sanity nor the burden of proof on the issue that is applied in Florida. Rather he alleges that denial of the right to present the insanity defense violated his right to a fair trial by jury, guaranteed by the Sixth and Fourteenth Amendments, even though his attorney conceded at the pretrial hearing that he was not insane under the M’Naughten standard. Record, Exhibit B, Tab 6, page 8.
Federal habeas relief does not lie unless the petitioner is in custody in violation of the Constitution, laws or treaties of the United States. 28 U.S.C. § 2254. The issue before us is whether the Constitution requires that a defendant be allowed to present an affirmative defense and instructions relating thereto to the jury even though the state court has ruled that there is no substantial evidence to support that defense and, indeed, defense counsel has conceded the defendant’s inability to meet the determinative legal standard. We answer the question in the negative.
Appellant’s contention is analogous to arguments raised in the context of asserting the affirmative defense of entrapment. This court has held that the defendant has the initial burden of producing substantial evidence to support the claim of entrapment before the defense properly is presented' to the jury. United States v. Reyes, 645 F.2d 285, 286-87 (5th Cir.1981); Sears v. United States, 343 F.2d 139, 143 (5th Cir.1965). The sufficiency of the evidence proffered to raise the defense of entrapment is a question of law for the court in the first instance; only if this threshold showing is made does a question of fact for the jury arise. United States v. Reyes, 645 F.2d at 287. No deprivation of the constitutional right to a fair trial or a trial by jury is raised by such a procedure. United States v. Humphrey, 670 F.2d 153,155 (11th Cir.1982), cert. denied, 456 U.S. 1010, 102 S.Ct. 2305, 73 L.Ed.2d 1307 (1982); United States v. Reyes, supra; United States v. Hill, 626 F.2d 1301, 1303-04 (5th Cir.1980); United States v. Wolffs, 594 F.2d 77, 80 (5th Cir.1979). Cf. United States v. DeLoach, 504 F.2d 185 (D.C.Cir.1974) (on direct appeal, if evidence is sufficient to support inferences underlying defendant’s non-affirmative defense, counsel must be allowed to make arguments to the jury); Strauss v. United States, 376 F.2d 416, 419 (5th Cir. 1967) (on direct appeal of federal conviction defendant is entitled to offer and have the jury instructed as to any theory of defense “for which there is any foundation in the evidence”).
Similarly here, under the law of Florida insanity is an affirmative defense. See Parkin v. State, 238 So.2d 817, 821-22 (Fla.1970). As with the entrapment defense, the burden of producing sufficient evidence to establish a jury question may constitutionally be placed on the defendant so long as the threshold level of proof is not of such a magnitude to deprive the defendant of due process protections. Although the state court may or may not have erred as a matter of state law in concluding that there was not sufficient evidence for the insanity defense to be presented to a jury, see Griffin v. State, supra, where appellant conceded that he could not satisfy the M’Naughten test, the federal constitutional threshold certainly was not crossed.
The judgment of the district court is AFFIRMED.
. Indeed other jurisdictions have explicitly ruled that use of the M’Naughten standard does not violate due process protections. See, e.g., United States ex rel. Phelan v. Brierley, 453 F.2d 73 (3d Cir.1971), judgment vacated on other grounds, 408 U.S. 939, 92 S.Ct. 2875, 33 L.Ed.2d 762 (1972); Ramer v. United States, 390 F.2d 564, 576 (9th Cir.1968), cert. denied, 393 U.S. 870, 89 S.Ct. 156, 21 L.Ed.2d 138 (1968). See also Leland v. Oregon, 343 U.S. 790, 800-01, 72 S.Ct. 1002, 1008-09, 96 L.Ed. 1302 (1952).
. This is a legal conclusion to which a presumption of correctness would not necessarily attach. Cf. Sumner v. Mata, 449 U.S. 539, 549, 101 S.Ct. 764, 770, 66 L.Ed.2d 722 (1981). Appellant has not shown by a preponderance of evidence however that the opposite legal conclusion should be reached by the federal habeas court.
. In Bonner v. City of Prichard, 661 F.2d 1206, 1209 (11th Cir.1981) (en banc), this circuit adopted as precedent the decisions of the former Fifth Circuit decided prior to October 1, 1981.
. Appellant in effect argues that regardless of the defendant’s ability to meet the appropriate legal standard he has a constitutional right to submit the affirmative defense of insanity to the jury in the hope that the jury will arrive at a favorable, but concededly erroneous, result. The Sixth and Fourteenth Amendments do not extend so far.