The tabloid news company American Media Inc. agreed to let a former Playboy model out of a contract that had kept her from talking freely about an alleged affair with Donald J. Trump.
The settlement agreement, reached on Wednesday, ends a lawsuit brought by the model, Karen McDougal, and protects the president from being drawn into a legal case involving efforts to buy the silence of women who had stories to tell about him during the 2016 campaign.
He still faces another lawsuit from Stephanie Clifford, the pornographic film actress known as Stormy Daniels. Ms. Clifford is suing to get out of a deal that Mr. Trump’s personal lawyer, Michael D. Cohen, arranged in 2016 for her silence about an alleged affair. Mr. Trump’s representatives have denied both women’s stories.
In August 2016, A.M.I., which owns The National Enquirer, acquired the rights to Ms. McDougal’s story about Mr. Trump — which it never ran — in return for $150,000 and commitments to use its magazines to promote her current career as a fitness specialist.
Under the terms of Wednesday’s settlement, A.M.I. has the right to up to $75,000 of any future profits from her story about the alleged affair. According to her lawyer, Peter K. Stris, Ms. McDougal can keep the $150,000 payment, and the publisher will retain the rights to photographs of her that it already has.
In a statement, A.M.I. called the settlement an “amicable resolution” and said that under the new agreement it would devote an upcoming magazine cover and feature article to Ms. McDougal, and would run several of her fitness columns in its publications.
“It’s a total win,” Mr. Stris said in an interview. “We got everything we were fighting for — she got out of the contract, gets the life rights back and owes A.M.I. nothing more.”
In a separate interview, Ms. McDougal expressed elation about the end of her “wild ride,” and said she currently had no plans to sell the rights to her story to a new buyer. “It’s one step at a time for me,” she said. “Today, I’m doing my victory dance.”
Her lawsuit said that A.M.I., whose chairman, David J. Pecker, is a friend of President Trump’s, misled her into signing the contract. It also claimed that Mr. Cohen had inappropriately intervened in the deal. A.M.I. had denied misleading her.
The deal and the extent of Mr. Cohen’s role in it are the subjects of a wide-ranging federal corruption investigation that is, in part, looking into his efforts to protect Mr. Trump’s presidential prospects in 2016.