There is not a way to prevent the other parent from claiming the child if he files first. If that happens:
Someone else claimed my dependent and my return was rejected
If someone else claimed your dependent already, then your e-filed return will be rejected. Print, sign and mail your own return which claims your dependent. Mailed returns are processed differently by the IRS. It will take some time (maybe even up to a year) but eventually the IRS will contact both parties and sort out who could rightfully claim the dependent. The person who wrongfully claimed the dependent will face repayment of refund $, plus penalties.
There is not a way to prevent the other parent from claiming the child if he files first. If that happens:
Someone else claimed my dependent and my return was rejected
If someone else claimed your dependent already, then your e-filed return will be rejected. Print, sign and mail your own return which claims your dependent. Mailed returns are processed differently by the IRS. It will take some time (maybe even up to a year) but eventually the IRS will contact both parties and sort out who could rightfully claim the dependent. The person who wrongfully claimed the dependent will face repayment of refund $, plus penalties.