Adoption Credit

I adopted my ex-husband's child. Our divorce and the adoption was filed at the same time. I am wondering if I can claim the adoption credit, as I had no legal connection to the child prior to our divorce.