In the case of C.L. v. Z.M.F.H., 18 A3d 1175 (Pa. Super 2011), the PA Superior Court had to decide upon the proper state for a custody case. Father lived in Pennsyvlania. Mother lived in an Indian Reservation in South Dakota.
Custody jurisdiction in the US is largely determined by the Uniform Child Custody Jurisdiction and Enforcement Act (UCCJEA). Under the UCCJEA, an Indian reservation is treated as a state.
Mother filed for custody in 2006 at the South Dakota reservation. Father later filed for custody in 2007 in Pennsylvania. Custody is most often determined by the "home state" of the child under the UCCJEA - that is, the state where the child resided for 6 months immediately prior to the custody filing. In this case, there was no "home state". Where there is no home state, the UCCJEA gives preference to the first state where the case is filed. Usually, the two courts will communicate to see who filed first.
Also, under the UCCJEA, a state may not excercise custody jurisdiction if a proceeding has previously begun in another state, unless the original state court finds the new state to be more convenient. Therefore, jurisdiction stayed at the South Dakota reservation and did not lie in Pennsyvlania. Once the state of original jusidiction is determined, it is up to the court of that state to determine proper jurisdiction.
Remember that "first to file" does not generally matter when the child has a "home state". Even where the child has no home state, the court of the first filing can decide that a later state is a more convenient forum and transfer the case to the laster state. But, when there is no "home states" jurisdiction, the first party to the courthouse gets to have their court decide the issue. Also, the first case filed may have more "momentum" and thus be more likely to stay in the state of first filing. So, a parent with no custody order in place and no "home state" for the child may wish to speak with their attorney about filing first.