TMZ has learned that lawyers for Larry Birkhead and Howard K. Stern are in settlement negotiations.

There was a buzz at the courthouse after Krista Barth, Stern's lawyer, removed a styrofoam cup of water that rested on the witness stand as Birkhead testified in the Anna Nicole burial hearing. The cup went missing and there was speculation that Stern's reps used it for a DNA test, which could have provided the evidence proving Birkhead is the father Anna Nicole's daughter Dannielynn.

We're told a day after the cup incident, the parties started negotiating. TMZ spoke with Birkhead's lawyer Debra Opri Sunday in the Bahamas, who would not confirm a settlement. She did, however, say DNA testing must be completed and paternity established before any settlement could occur.

Sources say Stern could be amenable to giving Birkhead what he needs to establish custody. We're told that in return, Stern wants ongoing control of Anna's estate and, once the estate is probated, continued involvement by becoming trustee for Dannielynn.