(4) (A) The term “child” means (except for purposes of chapter 19 of this title (other than with respect to a child who is an insurable dependent under subparagraph (B) or (C) of section 1965(10) of such chapter) and section 8502(b) of this title ) a person who is unmarried and— (i) who is under the age of eighteen years; (ii) who, before attaining the age of eighteen years, became permanently incapable of self-support; or (iii) who, after attaining the age of eighteen years and until completion of education or training (but not after attaining the age of twenty-three years), is pursuing a course of instruction at an approved educational institution; and who is a legitimate child, a legally adopted child, a stepchild who is a member of a veteran’s household or was a member at the time of the veteran’s death, or an illegitimate child but, as to the alleged father, only if acknowledged in writing signed by him, or if he has been judicially ordered to contribute to the child’s support or has been, before his death, judicially decreed to be the father of such child, or if he is otherwise shown by evidence satisfactory to the Secretary to be the father of such child. A person shall be deemed, as of the date of death of a veteran, to be the legally adopted child of such veteran if such person was at the time of the veteran’s death living in the veteran’s household and was legally adopted by the veteran’s surviving spouse before August 26, 1961 , or within two years after the veteran’s death; however, this sentence shall not apply if at the time of the veteran’s death, such person was receiving regular contributions toward the person’s support from some individual other than the veteran or the veteran’s spouse, or from any public or private welfare organization which furnishes services or assistance for children. A person with respect to whom an interlocutory decree of adoption has been issued by an appropriate adoption authority shall be recognized thereafter as a legally adopted child, unless and until that decree is rescinded, if the child remains in the custody of the adopting parent or parents during the interlocutory period. A person who has been placed for adoption under an agreement entered into by the adopting parent or parents with any agency authorized under law to so act shall be recognized thereafter as a legally adopted child, unless and until such agreement is terminated, if the child remains in the custody of the adopting parent or parents during the period of placement for adoption under such agreement. A person described in clause (ii) of the first sentence of this subparagraph who was a member of a veteran’s household at the time the person became 18 years of age and who is adopted by the veteran shall be recognized as a legally adopted child of the veteran regardless of the age of such person at the time of adoption. (B) For the purposes of subparagraph (A) of this paragraph, in the case of an adoption under the laws of any jurisdiction other than a State (as defined in section 101(20) of this title and including the Commonwealth of the Northern Mariana Islands)— (i) a person residing outside any of the States shall not be considered to be a legally adopted child of a veteran during the lifetime of such veteran (including for purposes of this subparagraph a Commonwealth Army veteran or new Philippine Scout, as defined in section 3566 of this title ) unless such person— (I) was less than eighteen years of age at the time of adoption; (II) is receiving one-half or more of such person’s annual support from such veteran; (III) is not in the custody of such person’s natural parent, unless such natural parent is such veteran’s spouse; and (IV) is residing with such veteran (or in the case of divorce following adoption, with the divorced spouse who is also an adoptive or natural parent) except for periods during which such person is residing apart from such veteran (or such divorced spouse) for purposes of full-time attendance at an educational institution or during which such person or such veteran (or such divorced spouse) is confined in a hospital, nursing home, other health-care facility, or other institution; and (ii) a person shall not be considered to have been a legally adopted child of a veteran as of the date of such veteran’s death and thereafter unless— (I) at any time within the one-year period immediately preceding such veteran’s death, such veteran was entitled to and was receiving a dependent’s allowance or similar monetary benefit under this title for such person; or (II) for a period of at least one year prior to such veteran’s death, such person met the requirements of clause (i) of this subparagraph.