Updated

Christie Brinkley's lurid divorce trial came to an abrupt end Thursday when lawyers for the former supermodel and her fourth husband reached an out-of-court settlement that gives her custody of their two children.

Brinkley will give her estranged husband, architect Peter Cook, $2.1 million but will keep 18 properties in the Hamptons. Cook also will get time with the children.

"It's to me a very bittersweet moment because it really is the death of a marriage," Brinkley, 54, said after the settlement was announced in court. "I'm very pleased with the results today. I was here fighting for custody." She held an elaborate dinosaur diorama she had helped her son make for a science class; it was used as evidence at the trial.

"It's everything I asked for," said Cook, 49.

The couple were married for a decade before Cook's affair with a teenager he met in a Southampton toy store catapulted their troubles into the public spotlight in 2006.

The trial, which heard testimony for a fifth day Wednesday, revealed a litany of salacious allegations about Cook's affair with 18-year-old Diana Bianchi, as well as interactive Internet sex liaisons that cost him thousands of dollars a month. Cook testified that he gave Bianchi a $300,000 payoff after having trysts with her in his office and Brinkley's Hamptons homes for several months in 2005.

The former Sports Illustrated model said she was devastated to learn of the affair from the teen's stepfather, moments after Brinkley delivered a commencement speech at Southampton High School.

Despite a prenuptial agreement, the couple had feuded in court over child custody and bickered over the properties Cook advised Brinkley to buy in the Hamptons.

The couple have a daughter, Sailor, 10. Cook adopted Brinkley's 13-year-old son Jack, whom she had with husband No. 3, Richard Taubman.

The children's attorney, Theresa Mari, said Thursday that both parents "worked very hard to do this in the best interest of the children."

Brinkley and her attorneys had contended that Cook's admitted adultery and pornographic proclivities made him an unsuitable candidate for child custody.

"Anyone who would run the risk of destroying this wonderful life, anybody that would chase a teenager -- I mean, a young girl -- where is his judgment?" she said from the witness stand.

Under the settlement, Cook will see the children every other weekend and on Wednesday nights -- an arrangement that has been in place for some time.

The family boat, Sweet Freedom, will be sold and the profit will be split. Brinkley's publicist said her portion will be donated to The Retreat in East Hampton, a shelter for domestic violence victims.

The agreement was reached at 6:15 a.m. Thursday after an all-night negotiating session, according to Brinkley's lawyer, Robert Stephan Cohen. He said the remainder of the settlement was confidential.

It was not clear what sparked the move toward conciliation after days of embittered testimony, but on Tuesday a court-appointed psychiatrist said Brinkley should be granted custody. Dr. Stephen Herman said Cook deserved liberal access to the children, but added that both parents were in need of counseling to deal with their personal issues.

Herman said that the model needs to examine her taste in men and that Cook is a narcissist with a bottomless ego.

Cook's lawyer, Norman Sheresky, repeatedly accused Brinkley of seeking to "publicly flog" her husband, noting that she had supported keeping the trial open to the public.

"I didn't want this trial. It's humiliating for all of us," replied Brinkley. "...I really, really wanted to settle this."

Brinkley also rejected criticism that the graphic revelations about Cook would have an adverse impact on the children. She sent them to camp during the trial and contended most of the scandalous details were old news.

She said she tried to spare her children the messy details of the breakup, including her discovery of Cook's Internet porn habits. She told them: "I think Daddy has fallen out of love with me," while assuring them they would always be loved.

As the scandal became public, she took the children on a private plane for a vacation in Colorado. "I took them to the top of a mountain, and we camped out under the stars," without TV or Internet access, she said.

While they were away, she said, "Ms. Bianchi spilled the beans. She went on TV to get her 15 minutes of fame."

Brinkley also has a daughter, Alexa Ray Joel, with rock 'n' roll Hall of Famer Billy Joel. The 22-year-old testified that Cook picked on her and once shoved her head into a bucket of water after she showered too long and caused a plumbing problem; he denied it.

Brinkley's first husband was artist Jean-Francois Allaux.