Updated

A Bahamian judge ordered Anna Nicole Smith's baby daughter to undergo a DNA test Tuesday to determine who is the child's father, according to an attorney for Smith's mother.

Smith's companion Howard K. Stern, her ex-boyfriend Larry Birkhead and her estranged mother Virgie Arthur were all present at Tuesday's hearing, which began at 2:30 p.m. ET.

Both Birkhead and Stern maintain they are 6-month-old Dannielynn's father and are fighting for custody, along with Arthur.

Birkhead, who asked the judge to order the test, reportedly pumped his fists in the air and jumped up and down after leaving the courtroom.

"I feel great," he said. "It's been a good day in court for me." Asked if he thought he would see the girl soon, he only smiled and winked.

Deborah Rose, the attorney for Arthur, confirmed that the judge ordered the test.

Stern, who is listed as the father on the girl's birth certificate, left the courthouse in a black sport utility vehicle as Birkhead greeted a crowd of cheering tourists.

Smith, 39, died Feb. 8 after collapsing in a Florida hotel. Authorities have not disclosed the cause.

Stern has been caring for the girl in the gated, waterfront home where he lived with Smith in the months before she died. The Bahamian courts have ordered Stern not to leave the country with the girl before a custody ruling.

Arthur wants to take Dannielynn from Stern, arguing she could provide a more stable home. She did not speak as she exited the courthouse and left in a white limousine.

Birkhead, a Los Angeles photographer, filed a lawsuit in Los Angeles in October seeking a court order to demand Smith bring the baby to California for a test. A judge ruled in his favor in December, but efforts by his legal team to secure a DNA sample have not been successful.

The girl, Dannielynn Hope Marshall Stern, could inherit millions from the estate of Smith's late husband, Texas oil tycoon J. Howard Marshall II. Smith had been fighting his family over his estimated $500 million fortune since his death in 1995.

Frederic von Anhalt, the husband of Zsa Zsa Gabor, also says he may be Dannielynn's father. Last month, he too filed legal documents seeking a DNA test to determine if he is the father.

The Associated Press contributed to this report.