You claim the dependent on your tax return, and file it by mail. You will not be able to e-file. Ask the other parent to file an amended return to remove the dependent. If they do that, the problem is fixed.
If the other parent does not file an amended return, both of you will get letters from the IRS telling you that the one who is not entitled to claim the dependent should file an amended return. The letters might not come until a year or so from now. If the other parent amends after getting the letter, then it's fixed. If neither of you amends, you will both get a second letter asking for information to justify claiming the dependent. The IRS will then decide which parent is entitled to claim the dependent. The parent who is not entitled to claim the dependent will get billed for the additional tax plus penalties and interest.
You claim the dependent on your tax return, and file it by mail. You will not be able to e-file. Ask the other parent to file an amended return to remove the dependent. If they do that, the problem is fixed.
If the other parent does not file an amended return, both of you will get letters from the IRS telling you that the one who is not entitled to claim the dependent should file an amended return. The letters might not come until a year or so from now. If the other parent amends after getting the letter, then it's fixed. If neither of you amends, you will both get a second letter asking for information to justify claiming the dependent. The IRS will then decide which parent is entitled to claim the dependent. The parent who is not entitled to claim the dependent will get billed for the additional tax plus penalties and interest.
If someone else claimed your child inappropriately, and if they file first, your return will be rejected if e-filed. You would then need to file a return on paper, claiming the child as appropriate. The IRS will process your return and send you your refund, in the normal time. Shortly (up to a year) thereafter, you'll receive a letter from the IRS, stating that your child was claimed on another return. It will tell you that if you made a mistake to file an amended return and if you didn't make a mistake to do nothing. The other party will get the same letter you did. If one of you doesn't file an amended return, unclaiming the child, the next letter, from the IRS, will require you to provide proof. Be sure to reply in a timely manner.
Winner gets the tax benefits; loser gets to pay the IRS back with penalties and interest. The custodial parent almost always wins. The IRS goes by physical custody, not legal custody. The non-custodial parent can only claim the child as a dependent if the custodial parent gives permission (on form 8332) or if it's spelled out in a pre 2009 divorce decree.
More info:
https://www.thebalance.com/claiming-same-dependent-audit-risk-3193030 (audit discussion)
__________________________________________________________________________________________
There is a way to split the tax benefits. For future negotiations with the other parent (and maybe even for this year) the following info may be of use:
There is a special rule in the case of divorced & separated (including never married) parents. When the non-custodial parent is claiming the child as a dependent/exemption/child tax credit; the custodial parent is still allowed to claim the same child for Earned Income Credit, Head of Household filing status, and day care credit. This "splitting of the child" is not available to parents who lived together at any time during the last 6 months of the year; then only one of you can claim the child for any tax reasons. The tax benefits may not be split in any other manner.
Note in particular that the non-custodial parent can never claim the Earned Income Credit, Head of Household filing status or the day care credit, based on that child, even when the custodial parent has released the dependency to him.