PRINCETON, N.J. (AP) — Bristol-Myers Squibb Co. and two Japanese firms said Wednesday night they will collaborate to develop and sell an experimental drug meant to correct a dangerous abnormal heart rhythm called atrial fibrillation. The licensing deal, worth $40 million plus milestone and other payments that could total $345 million, involves two Tokyo companies, Nissan Chemical Industries Ltd. and Teijin Pharma Ltd., that are jointly developing the compound, NTC-801. The drug is intended to stop atrial fibrillation — a condition in which the upper chambers of the heart begin quivering rather than beating effectively — by changing the chambers' electrical properties to bring normal heart rhythm back. About 2.2 million Americans have the disorder, which can cause strokes. Under the deal, New York-based Bristol-Myers, which has its research headquarters in Princeton, N.J., gets exclusive rights to both the drug and some backup compounds worldwide, except in Japan. The two Japanese companies will get an upfront payment of $40 million, another $170 million in payments if they reach set milestones in testing of the compounds, up to $175 million more for sales-based milestones, plus royalties for actual sales.