David admitted to PEOPLE mag he had a relationship with a woman -- NOT RACHEL UCHITEL -- but "She asked for money. I felt as though I was being blackmailed...."
TMZ knows what went down. We're told Boreanaz had a short-term relationship with the woman -- one source says they hooked up "2 or 3 times." Sources say he started paying her money -- several thousand dollars here and there -- but she began demanding more, threatening to go public with the affair. Boreanaz then confessed the affair to Jaime Bergman, his wife of 9 years.
Enter Gloria Allred, who reps the mistress. Allred contacted Boreanaz' lawyer -- legal pit bull Marty Singer -- and demanded 6 figures.
Boreanaz then blunted the attack by going public with his affair. He has refused to pay the mistress another cent.
UPDATE: Gloria Allred just told TMZ what we told you yesterday ... Rachel Uchitel was not the woman who tried getting $$$ out of Boreanaz.