By Brendan Pierson

NEW YORK (Reuters) - A federal judge in Los Angeles has dismissed a lawsuit brought by a surrogate mother of triplets seeking to overturn California's surrogacy law and name her as the children's mother.

U.S. District Judge Otis Wright on Monday acknowledged the "gravity" of the claims brought by the surrogate mother, Melissa Cook, but said they should be decided by California's state courts, which have so far ruled against her.

Cook, 48, filed her lawsuit in federal court in Los Angeles in February shortly before the triplet's father, identified in court documents as C.M., won an order from a California state court naming him as the sole parent.

Harold Cassidy, Cook's lawyer, said he planned to appeal Wright's ruling and to file a new lawsuit for custody in state court in Georgia, where C.M. lives.

C.M.'s lawyer could not be reached immediately for comment.

In the federal lawsuit, Cook said the California law authorizing surrogacy contracts is unconstitutional because it treats babies "as a commodity or as chattel."

Cook asked the federal court to overturn the state law, which says that surrogacy contracts are presumed to be valid, and to require that she be listed as the mother on the babies' birth certificates.

Wright, in dismissing the case on Monday, said he must allow the state appeals court to rule on Cook's pending appeal of the February state court order.

Though he did not rule on the merits, he said that if Cook won it could effectively end surrogacy in the state by allowing a surrogate mother to claim parental rights "at her whim."

Cook was connected with the father through a surrogacy brokerage and agreed to act as a surrogate for him in 2015, according to Wright's opinion. The biological mother was an anonymous egg donor.

In August 2015, three male embryos were implanted in Cook's uterus. Shortly after that, her doctor confirmed that all three were viable.

During her pregnancy, Cook's relationship with C.M., who she learned was a deaf 50-year-old postal worker who lived with his parents, became contentious, according to Wright's opinion.

C.M. repeatedly asked Cook to abort one of the fetuses, saying he could not afford to care for all three.

The triplets were born prematurely later that month and kept in intensive care at Panorama City Medical Center in Los Angeles, according to the opinion. In April, they were released to C.M.'s care.

The case is Cook v. Harding et al, U.S. District Court, Central District of California, No. 16-cv-00742.

(Reporting by Brendan Pierson in New York; Editing by Alexia Garamfalvi and Leslie Adler)