(Reuters) - Former Playboy model Karen McDougal reached an agreement on Wednesday with tabloid publisher American Media Inc that will allow her to speak freely about an affair she alleges she had with President Donald Trump, the company said in a statement.

McDougal filed suit in California last month seeking to be released from a deal reached in 2016 with AMI, publisher of the National Enquirer, that gave the company exclusive rights to her story in exchange for $150,000.

“AMI is pleased that we reached an amicable resolution with Ms. McDougal today that provides both sides what they wanted as a result,” the company said in a statement.

Representatives for McDougal did not immediately respond to a request for comment.

Under the deal, AMI said it would have the right to receive up to $75,000 of any future profits from the sale of her story about the alleged 10-month affair, which she says started in 2006.

McDougal will also appear on the September 2018 cover of Men’s Journal magazine, which will include a feature-length article about her, the company said.

In an interview with CNN that aired last month, McDougal said she was in love with Trump and the affair started not long after his wife, Melania, gave birth to their son, Barron.

The White House has said that Trump denies having an affair with McDougal.

AMI has said McDougal was permitted to speak about her relationship with Trump in response to “legitimate press inquiries.”

McDougal had argued in her lawsuit that the agreement was an illegal corporate donation from AMI to the Trump campaign that violated federal election law.

American Media head David Pecker has described Trump as a “personal friend.”

Trump has been engaged in a legal battle with adult-film actress Stormy Daniels, who says she had a one-night stand with Trump in 2006.

Daniels, whose real name is Stephanie Clifford, has sued Trump and his lawyer Michael Cohen to be released from a 2016 agreement not to publicly discuss the alleged sexual encounter in exchange for $130,000.

The White House has denied that Trump had sex with Daniels.