If a petitioner in a child custody proceeding under this chapter has improperly removed the child from the custody of the parent or Indian custodian or has improperly retained custody after a visit or other temporary relinquishment of custody, the court shall decline jurisdiction over the petition and shall immediately return the child to the child's parent or Indian custodian unless returning the child to the parent or Indian custodian would subject the child to substantial and immediate danger or threat of such danger.
RCW 13.38.160