                               PUBLISHED

                    UNITED STATES COURT OF APPEALS
                        FOR THE FOURTH CIRCUIT


                              No. 14-7691


THOMAS SHANE MATHERLY,

                  Petitioner - Appellant,

           v.

JUSTIN ANDREWS,

                  Respondent - Appellee.



Appeal from the United States District Court for the Eastern
District of North Carolina, at Raleigh.  James C. Dever III,
Chief District Judge. (5:13-hc-02077-D)


Argued:   January 28, 2016                  Decided:   March 16, 2016


Before TRAXLER, Chief Judge, and AGEE and WYNN, Circuit Judges.


Affirmed in part; reversed and remanded in part by published
opinion. Chief Judge Traxler wrote the opinion, in which Judge
Agee and Judge Wynn joined.


ARGUED: Joshua Robbins, Brian Remondino, UNIVERSITY OF VIRGINIA
SCHOOL OF LAW, Charlottesville, Virginia, for Appellant. Michael
Lockridge, BUREAU OF PRISONS, Butner, North Carolina, for
Appellee.    ON BRIEF: Stephen L. Braga, Appellate Litigation
Clinic, UNIVERSITY OF VIRGINIA SCHOOL OF LAW, Charlottesville,
Virginia, for Appellant.      Thomas G. Walker, United States
Attorney, R.A. Renfer, Jr., Assistant United States Attorney,
OFFICE OF THE UNITED STATES ATTORNEY, Raleigh, North Carolina,
for Appellee.
TRAXLER, Chief Judge:

      Thomas    Shane    Matherly    appeals         from   the    district    court’s

order   granting        summary     judgment         to     the    respondent       (the

“government”) on his petition for a writ of habeas corpus, filed

under 28 U.S.C. § 2241.           In the petition, Matherly challenges

his   prior    civil    commitment    as       a    “sexually     dangerous    person”

under 18 U.S.C. § 4248 of the Adam Walsh Child Protection and

Safety Act of 2006 (the “Act”).                See United States v. Matherly,

514 Fed. App’x. 287 (4th Cir. 2013) (per curiam).                             For the

following reasons, we affirm the district court’s decision in

part, and reverse and remand in part.

                                       I.

                                       A.

      The   Adam   Walsh    Act   authorizes          the   civil   commitment      of,

inter   alia,    “sexually    dangerous            person[s]”     who   are   “in   the

custody of the Bureau of Prisons.”                   18 U.S.C. § 4248(a).            The

civil commitment process is initiated when the Attorney General,

his designee, or the Director of the Bureau of Prisons (“BOP”),

certifies to the district court where the individual is confined

that the individual “is a sexually dangerous person.”                         Id.    The

certification automatically stays the inmate’s release pending a

hearing.      See id.

      A “sexually dangerous person” is defined as “a person who

has engaged or attempted to engage in sexually violent conduct

                                           2
or child molestation and who is sexually dangerous to others.”

18 U.S.C. § 4247(a)(5).                     A person is “sexually dangerous to

others” if “the person suffers from a serious mental illness,

abnormality, or disorder as a result of which he would have

serious difficulty in refraining from sexually violent conduct

or   child        molestation        if    released.”           18    U.S.C.     §    4247(a)(6).

This “serious difficulty” prong “refers to the degree of the

person’s          ‘volitional        impairment,’           which     impacts    the     person’s

ability to refrain from acting upon his deviant sexual desires.”

United       States        v.   Hall,     664     F.3d       456,     463   (4th      Cir.    2012)

(quoting Kansas v. Hendricks, 521 U.S. 346, 358 (1997)).

      “If, after [a] hearing, the [district] court finds by clear

and convincing evidence that the person is a sexually dangerous

person, the court shall commit the person to the custody of the

Attorney          General,”       either         for        release    to    a       state    civil

commitment          system      or    to     a    federal        facility        until       it   is

determined that the person “is no longer sexually dangerous to

others, or will not be sexually dangerous to others if released

under        a     prescribed         regimen          of     medical,      psychiatric,          or

psychological care or treatment.”                           18 U.S.C. § 4248(d); see also

United States v. Timms, 664 F.3d 436, 439 (4th Cir. 2012).

                                                  B.

        In       October    2003,     Matherly         pled     guilty      to   one    count     of

possession of child pornography and was sentenced to 41 months

                                                  3
imprisonment, followed by a 3-year term of supervised release.

See     18    U.S.C.      §    2252A(a)(5)(B).           Shortly      thereafter,     the

district court also revoked Matherly’s supervised release from

an    earlier     conviction          for   interstate    travel      to   engage    in   a

sexual act with a minor, see 18 U.S.C. § 2423, and sentenced him

to a consecutive 6-month term of imprisonment.                             Matherly was

committed to the custody of the BOP to serve his aggregate 47-

month prison term.             See 18 U.S.C. § 3621(a).

       From October 31, 2003, to November 22, 2006, Matherly was

serving his term of imprisonment in a BOP facility.                          With prior

time served, and assuming that he earned the “good time” credit

available under 18 U.S.C. § 3624(b), Matherly was eligible to be

released to supervision on November 23, 2006.                      See J.A. 33; see

also United States v. Comstock, 627 F.3d 513, 517 (4th Cir.

2010)        (noting     that     Matherly’s      projected     release       date    was

November       23,     2006). 1       However,    it   now   appears       that   because

November       23,     2006,    was    Thanksgiving      Day,   the    BOP   originally

       1
       By statute, “[a] prisoner shall be released by the Bureau
of Prisons on the date of the expiration of the prisoner’s term
of imprisonment, less any time credited toward the service of
the prisoner’s sentence.”    18 U.S.C. § 3624(a).    The BOP may
grant “good-time credit” of up to 54 days per year, see 18
U.S.C. § 3624(b)(1), and such “credit awarded . . . shall vest
on the date the prisoner is released from custody,” 18 U.S.C. §
3624(b)(2).   However, “[n]othing in [subsection 3624] shall be
construed to limit or restrict the authority of the Director of
the Bureau of Prisons under section 3621.”          18 U.S.C. §
3624(c)(4).     Without application of any good-time credit,
Matherly’s sentence would have expired on May 26, 2007.


                                              4
intended to exercise its discretion to release Matherly from his

criminal confinement and to supervised release one day early –

on November 22, 2006.           See J.A. 31 (noting that Matherly “was

scheduled for release” on November 22, 2006); see also 18 U.S.C.

§ 3624(a) (“If the date for a prisoner’s release falls on a

Saturday,     a   Sunday,   or    a     legal    holiday       at    the    place    of

confinement, the prisoner may be released by the Bureau on the

last   preceding     weekday.”).        On   that     same   day,        however,   the

government certified Matherly as a “sexually dangerous person”

under 18 U.S.C. § 4248, automatically staying his release from

the custody of the BOP.

       During the ensuing civil commitment proceedings, Matherly

“conce[ded] that he previously engaged in child molestation and

suffers from a serious mental disorder,” leaving the government

with the task of “prov[ing] by clear and convincing evidence

only that Matherly ‘would have serious difficulty in refraining

from    sexually      violent     conduct       or     child        molestation      if

released.’”       Matherly, 514 Fed. App’x. at 288 (quoting 18 U.S.C.

§   4247(a)(6)).       On   May    3,    2012,       following      an     evidentiary

hearing, the district court found that Matherly was a “sexually

dangerous person” under the Act and ordered that he be committed




                                         5
to the custody of the Attorney General.           We affirmed.        See id.

at 289. 2

      On April 1, 2013, Matherly filed a pro se petition for a

writ of habeas corpus under 28 U.S.C. § 2241, alleging, among

other things, that the Adam Walsh Act had been impermissibly

applied retroactively to him and that, in any event, he was not

“in the custody of the Bureau of Prisons” within the meaning of

§ 4248(a) when the government filed the § 4248 certificate.                 The

government moved to dismiss the petition or, in the alternative,

for   summary   judgment,   which   the   district     court    granted.     On

appeal, we appointed counsel for Matherly.

                                    II.

      We begin with Matherly’s claim that the Adam Walsh Act was

impermissibly applied to him because the Act became effective

after he was convicted of his criminal offenses and committed to

the custody of the BOP.

      The   commitment   proceedings      authorized    under    §   4248   are

“civil - not criminal” in nature.           See Timms, 664 F.3d at 456.

They are not intended to and do not punish an inmate for prior


      2The delay between the filing of Matherly’s certificate and
the order of civil commitment was the product of extended
litigation    by    Matherly    and    others    regarding    the
constitutionality of the Adam Walsh Act.    See United States v.
Comstock, 627 F.3d 513 (4th Cir. 2010); United States v.
Comstock, 551 F.3d 274 (4th Cir. 2009), rev’d in part, 560 U.S.
126 (2010).


                                     6
criminal offenses.               See id.        Accordingly, the Double Jeopardy

and Ex Post Facto Clauses do not provide an avenue for release.

See   id.     at       455-56;    see    also   Hendricks,       521    U.S.     at   370-71.

Matherly does not contend otherwise.                          Rather, he claims that

application of the Act to him violated the general presumption

against the retroactive application of newly enacted statutes to

prior conduct.               See Landgraf v. USI Film Prods., 511 U.S. 244,

265 (1994).         We disagree.

       “[T]he permissibility of applying a statute retroactively

is a ‘pure question of law,” Jaghoori v. Holder, 772 F.3d 764,

769    (4th      Cir.        2014),     and    “is,    at     bottom,    a     question    of

congressional intent,” id. at 770.                       When determining whether a

statute       has       been     impermissibly         applied      retrospectively,       we

engage      in     a    three-step       inquiry       and    apply     “‘a    commonsense,

functional judgment.’”                  Jaghoori, 772 F.3d at 771 (quoting INS

v.    St.   Cyr,        533    U.S.     289,    321    (2001)).         First,    we    “must

determine          ‘whether       Congress       has     expressly       prescribed       the

statute’s proper reach.’” Cruz v. Maypa, 773 F.3d 138, 144 (4th

Cir. 2014) (quoting Landgraf, 511 U.S. at 280).                                “If so, the

inquiry ends there.”              Id.     If we determine that Congress has not

spoken with the requisite clarity, we “must decide whether the

statute     would        operate       retroactively,        ‘i.e.,    whether    it    would

impair      rights       a     party    possessed      when    he     acted,    increase    a

party’s liability for past conduct, or impose new duties with

                                                7
respect    to    transactions           already        completed.’”            Id.     (emphasis

added)    (quoting      Landgraf,          511       U.S.    at   280).         However,    “[a]

statute does not operate retrospectively merely because it is

applied in a case arising from conduct antedating the statute’s

enactment,       or     upsets         expectations           based       on     prior     law.”

Landgraf, 511 U.S. at 269 (citation and internal quotation marks

omitted).       Finally, if we determine that “the statute does have

a    retroactive      effect,”        we   will       not     apply    it      “‘absent    clear

congressional intent favoring such a result.’”                                   Id. (quoting

Landgraf, 511 U.S. at 280).

       We think Congress sufficiently expressed its intent that

the Adam Walsh Act apply to all persons in the BOP’s custody who

would pose a current threat to the public if released.                                    See 18

U.S.C. § 4247(a)(5), (6) (defining a “sexually dangerous person”

in part as one “who is sexually dangerous to others,” because

“the person suffers from a serious mental illness, abnormality,

or    disorder     as    a     result       of       which     he     would     have     serious

difficulty in refraining from sexually violent conduct or child

molestation if released”).                 There is “[n]othing on the face of

the statute [that] suggests that [Congress] sought to create

anything     other      than      a    civil     commitment           scheme     designed     to

protect the public from [a present threat of] harm.”                                 Hendricks,

521 U.S. at 361.             There is likewise nothing that suggests that

Congress     intended        to       protect        the     public    from      a     “sexually

                                                 8
dangerous” person who might be committed to the custody of the

BOP in the future, but not from a “sexually dangerous” person

who is already in its custody and nearer to release.

      But even if we were to hold that Congress did not speak

with the requisite clarity regarding the statute’s proper scope,

Matherly’s      challenge         fails   because          the    Act   does    not    operate

retroactively.         In Hendricks, the United States Supreme Court

rejected a challenge to a state statute that also permitted the

civil    commitment        of     “sexually        violent       predator[s]”      who   were

presently confined by the state but scheduled for release.                                Id.

at 352 (internal quotation marks omitted).                          A “sexually violent

predator” was defined as “any person who has been convicted of

or charged with a sexually violent offense and who suffers from

a mental abnormality or personality disorder which makes the

person     likely     to     engage       in     the       predatory     acts    of     sexual

violence.”       Id. (internal quotation marks omitted).                              As with

§ 4248    of    the   Adam      Walsh     Act,     the     civil    commitment        “inquiry

[was]    thus    two-fold,        requiring        .   .    .    both   retrospective     and

prospective findings.”              Timms, 664 F.3d at 439.                    Nevertheless,

the     Court   held       that    the     statute         “clearly      [did]    not    have

retroactive effect.”            Hendricks, 521 U.S. at 371.

      [T]he Act does not impose punishment; thus, its
      application does not raise ex post facto concerns.
      Moreover, the Act clearly does not have retroactive
      effect.      Rather,  the   Act   permits  involuntary
      confinement based upon a determination that the person

                                               9
      currently both suffers from a ‘mental abnormality’ or
      ‘personality disorder’ and is likely to pose a future
      danger to the public.       To the extent that past
      behavior is taken into account, it is used . . .
      solely for evidentiary purposes.

Id. at 370-71 (third emphasis added); see Landgraf, 511 U.S. at

266   (noting       that       “the     antiretroactivity              principle       finds

expression in several provisions of our Constitution,” including

“[t]he Ex Post Facto Clause”); Cruz, 773 F.3d at 145 (noting

that “Landgraf and the Ex Post Facto Clause are informed by the

same retroactivity concerns”).

      Like the statute at issue in Hendricks, the Adam Walsh Act

“does not seek to ‘affix culpability for prior’ acts.                                 Instead

it simply ‘uses’ prior acts ‘solely for evidentiary purposes’ to

support a finding of a person’s mental abnormality or future

dangerousness       or    both.”       Comstock,         627    F.3d   at   523    (quoting

Hendricks,    521    U.S.      at     362).        The    Act    “do[es]     not      operate

retroactively,”          but   rather     “address[es]           dangers      that      arise

postenactment.”          Vartelas v. Holder, 132 S. Ct. 1479, 1489 n.7

(2012); see id. (noting that “laws prohibiting persons convicted

of a sex crime against a victim under 16 years of age from

working in jobs involving frequent contact with minors, and laws

prohibiting     a    person     who     has    been       adjudicated       as    a    mental

defective or who has been committed to a mental institution from

possessing guns . . . do not operate retroactively.                                   Rather,

they address dangers that arise postenactment:                              sex offenders

                                              10
with a history of child molestation working in close proximity

to   children,    and      mentally     unstable        persons      purchasing          guns”)

(internal     quotation         marks     omitted);          see   also      Reynolds        v.

Johnson, No. 12-55675, 2015 WL 9584386 (9th Cir. Dec. 31, 2015)

(holding that the Adam Walsh Act “‘addresses dangers that arise

postenactment’ and therefore ‘does not operate retroactively’”)

(alterations     omitted)        (quoting    Vartelas,         132     S.    Ct.       at   1489

n.7); United States v. Wetmore, 766 F. Supp. 2d 319, 337 (D.

Mass. 2011) (rejecting retroactivity challenge to Adam Walsh Act

because     “Supreme       Court      precedent         is     clear      that         statutes

permitting the civil commitment of sexually dangerous persons

are not impermissibly retroactive and do not violate the Ex Post

Facto Clause”); cf. Matter of Jackson, 26 I. & N. Dec. 314, 318

(BIA May 20, 2014) (“Because the Adam Walsh Act addresses the

potential for future harm posed by . . . sexual predators to the

beneficiaries         of   family-based          visa    petitions,          .     .    .   the

application      of    its      provisions       to     convictions         that       occurred

before its enactment does not have an impermissible retroactive

effect.”).

      Accordingly,         we    affirm    the        district     court’s         grant      of

summary judgment to the government on Matherly’s retroactivity

claim.




                                            11
                                         III.

      Matherly      also     contends        that      his     civil     commitment        was

improper because the BOP had already released him from its legal

custody when the government filed the § 4248 certification.                                See

18 U.S.C. § 4248(a); United States v. Joshua, 607 F.3d 379, 388

(4th Cir. 2010) (holding that the term “custody” in § 4248(a)

means not simply physical custody, but rather “legal custody”

and, therefore, that “[t]he statutory language ‘in the custody

of   the   Bureau    of     Prisons’    .     .   .    requires        the    BOP    to   have

ultimate legal authority over the person’s detention”).

      The government asserted that the certification was timely

under the Act because Matherly “was in BOP custody serving the

last day of his criminal sentence” when it was filed.                               J.A. 27.

In   support,     the     government        submitted        a   Declaration         of   the

Custodian    of     Records    for     the    BOP,      referencing          and    attaching

records from the BOP “SENTRY” database, which “tracks the status

and activities of persons in BOP custody and provides . . .

sentence    information,        locations         of    confinement,          and    release

dates.”      J.A.     25.      According          to   these     records,          Matherly’s

projected    statutory        release    date,         after     application         of   time

served and good time credits, was November 23, 2006.                                However,

due to the Thanksgiving holiday, Matherly’s scheduled release

date was November 22, 2006 – the same day that the government

filed the § 4248 certificate.

                                             12
       In his pro se response to the government’s motion, however,

Matherly submitted a number of additional documents that he also

represents       to    be    BOP    records.          Matherly     claimed       that    “the

certificate          was   filed    after     the     expiration        of   his   sentence

because according to a BOP Memo,” dated October 24, 2006, he was

scheduled “to depart at 8:00 [a.m. on] November 22, 2006,” and

“[t]he certificate was filed two hours . . . after the departure

time,” at 10:08 a.m.               J.A. 35 (emphasis added); see also J.A.

46.        Based upon Matherly’s interpretation of these documents,

the    BOP      no    longer      had   legal      custody   -     or    ultimate       legal

authority - over him when the certificate was filed because “the

date       of    release         arrived    prior      to    the        filing     of     the

certification,”            and    the   BOP     had     already     “processed          [his]

paperwork for release.”             J.A. 38.

       On November 7, 2014, the district court granted summary

judgment to the government without holding a hearing.                               In its

order, the district court stated as follows:

            On November 22, 2006, at 9:20 a.m., the BOP
       released Matherly from custody.     Forty-eight minutes
       later, at 10:08 a.m., an Assistant United States
       Attorney for the Eastern District of North Carolina
       commenced   civil    commitment   proceedings   against
       Matherly by filing a Certification of a Sexually
       Dangerous Person pursuant to 18 U.S.C. § 4248(a).

J.A. 64 (citations omitted).                  However, the district court went

on    to    “reject[]       Matherly’s      claim     that   the    government      lacked

jurisdiction to file a certificate seeking his commitment on the

                                              13
final day of his criminal sentence.”                  J.A. 66.    In support of

its   conclusion,       the    district      court   cited    United     States    v.

Wetmore, 700 F.3d 570, 575 (1st Cir. 2012) and Hubbart v. Knapp,

379 F.3d 773, 779-81 (9th Cir. 2004).

      In Wetmore, the First Circuit Court of Appeals considered

inmate      Wetmore’s    similar       challenge     to    the   timing    of     the

government’s     filing       of   a   §   4248   certificate.     Although       the

certificate had been filed the day before Wetmore’s projected

release date of November 18, 2006, Wetmore argued that it was

untimely because his release date had been improperly calculated

and should have been set a day earlier.                   The court rejected the

challenge, as follows:

      [E]ven accepting Wetmore’s premise that he was due for
      release on November 17, 2006, the last day of a
      sentence is part of that sentence, 18 U.S.C. §
      3624(a); Wetmore was still serving his sentence in BOP
      custody on November 17 when the government filed its
      request; and so the request was timely on its face. .
      . .    If it was unlawful for BOP to detain Wetmore
      until 11:59 p.m. on November 17, Wetmore has yet to
      explain why.

Wetmore, 700 F.3d at 575 (emphasis added); see also Hubbart, 379

F.3d at 780-81 (denying federal habeas relief to a petitioner

who   had    been   civilly        committed      under   California’s    Sexually

Violent Predator Act where the state court determined that the

predator’s custody at the time the commitment proceedings were

initiated, while perhaps unlawful, “was the result of a good

faith error” and the Sexually Violent Predator Act had provided

                                           14
the petitioner “with numerous procedural safeguards”) (internal

quotation marks omitted).

     We have held that the word “custody” in § 4248 “refers not

to physical custody or some qualified derivative but rather to

legal custody” and, therefore, that “[t]he statutory language

‘in the custody of the Bureau of Prisons’ . . . requires the BOP

to have ultimate legal authority over the person’s detention.”

Joshua, 607 F.3d at 388 (emphasis added).                    In Joshua, however,

the inmate had been confined pursuant to a United States Army

court-martial and was merely being housed within a BOP-operated

facility.     See id. at 381; see also United States v. Hernandez-

Arenado,     571    F.3d    662,    667   (7th    Cir.     2009)    (rejecting      “an

interpretation       that    would     allow     physical     custody       alone    to

suffice”     and    instead        “read[ing]     custody     more       narrowly   as

including all federal offenders, but not those housed in the BOP

as a service to another entity which is responsible for that

individual’s incarceration”).              Here, in contrast, there is no

question that Matherly was remanded to the legal custody of the

BOP pursuant to a federal conviction and, therefore, that the

BOP “ha[d] ultimate legal authority over [Matherly’s] detention”

while   he    was    being    physically        confined    in     its    facilities.

Joshua, 607 F.3d at 388; id. at 386 (noting that the individuals

referenced in § 4248(a) includes “those remanded to the custody



                                          15
of the BOP after a federal conviction”); see also 18 U.S.C. §

2621.

       Thus,     the    question       presented    by    Matherly        is    more   aptly

described as whether the BOP relinquished its undisputed legal

authority over Matherly – prior to the expiration of Matherly’s

sentence        and     the        government’s      filing      of       the     §      4248

certification.          And, contrary to Matherly’s claim, we have never

held    that    physical        custody   is   irrelevant       to    the      question    of

whether the BOP relinquished its otherwise legal authority over

an inmate.       Cf. United States v. Savage, 737 F.3d 304, 308 (4th

Cir.    2013)     (noting       that    custody     “is   not    limited         to    actual

physical       custody,      but    denotes    a   type   of    legal     custody      which

remains in the Attorney General . . . as he discharges his

responsibility to transfer a prisoner from one institution to

another for the well-being of the prisoner”) (internal quotation

marks and alteration omitted); United States v. Earl, 729 F.3d

1064, 1068 (9th Cir. 2013) (interpreting “the term ‘released’ in

the context of the [supervised release] statute to require not

only release from imprisonment, but also release from the BOP’s

legal custody at the expiration of the prisoner’s prescribed

sentence”).

       Based     upon     the      government’s     submission       to     the   district

court, we might well have agreed that there existed no genuine

issue    of    fact     as    to    whether    Matherly    remained         in    both    the

                                              16
physical       and    legal     custody      of       the    BOP       when   the    §     4248

certificate was filed.             Matherly does not seem to dispute that

the BOP had the authority to maintain both legal and physical

custody of him pursuant to his criminal sentence until, at a

minimum, the end of the day on November 22, 2006.                             See 18 U.S.C.

§§ 3621(b), 3624(a); Wetmore, 700 F.3d at 575.                                 Nor does he

claim that the BOP released him from its physical custody.

      Nevertheless,         this   case      is   not       so     simple.          Matherly,

proceeding pro se at the time, submitted documents that he now

contends       are    sufficient,      in    light      of       the     district     court’s

factual finding, to establish that the BOP actually released him

from its legal custody at 9:20 a.m., on November 22, 2006.                                   In

particular,       Matherly      references        a    document          entitled     “Inmate

History.”       J.A. 44.       On its face, the document includes a list

of “admit[s]” and “release[s]” from BOP facilities, including a

“good conduct time release” from “BUF” to “BUT,” with a “start

date/time”       of    9:20    a.m.,    on    November           22,     2006,    and     “stop

date/time” of 9:30 a.m., on November 22, 2006.                           J.A. 44.        But if

that entry is significant, its significance is unexplained to

us.      Did   the    BOP     voluntarily     relinquish           its    “ultimate       legal

authority over [Matherly’s] detention,” Joshua, 607 F.3d at 388,

at that date and time as Matherly contends?                               Or did the BOP

merely    apply       the   good   time      credits        that       Matherly     had    been

projected to earn and release him from one facility to another

                                             17
in anticipation of the change in his status from a criminal

commitment to a civil commitment?               See, e.g., 18 U.S.C. §§ 3621,

3624.     We simply cannot tell.

      Here, the BOP records submitted by Matherly, even if they

had been authenticated, are insufficient to demonstrate that the

BOP relinquished its legal authority over Matherly prior to the

government’s filing of the § 4248 certificate on November 22,

2006,     as    Matherly      contends.         But     they     are       also   largely

unexplained.          And,   standing     alone,      they     are    insufficient     to

eliminate the possibility that genuine issues of material fact

exist regarding the BOP’s relinquishment of its legal custody

over Matherly.         All in all, we believe the better course is to

allow the parties an opportunity to better develop the record,

and     the    district      court   an   opportunity          to    make     additional

findings       and   conclusions     in   light    of    such    developments.        We

express no opinion as to whether summary judgment on Matherly’s

custody claim would be appropriate based upon a more developed

record.        Nor do we express any opinion as to the government’s

argument that, even if untimely, the filing of the certificate

could be excused as de minimis under the circumstances.

                                          IV.

      For the foregoing reasons, we affirm the district court’s

determination        that    the   Adam   Walsh    Act    was       not    impermissibly

applied       retroactively     to   Matherly.          However,      we    reverse   the

                                          18
district court’s grant of summary judgment to the government on

Matherly’s claim that he was not “in the custody” of the BOP

when   the   §   4248   proceedings   were    initiated,   and   remand   for

further proceedings on this issue.

                                                         AFFIRMED IN PART;
                                             REVERSED AND REMANDED IN PART




                                      19
