Republican presidential nominee Donald Trump has settled a $10 million lawsuit with former campaign staffer Sam Nunberg, according to New York court document filed on Thursday.

Nunberg couldn't comment on the terms and conditions of the confidential settlement, but he told CBS News, "I'm happy it's been amicably resolved. I wish Donald the best with the rest of his campaign."

The settlement brings to an end a month-long dispute in which the business mogul claimed that Nunberg had breached a confidentiality agreement, alleging that he provided the New York Post with details concerning a supposed affair between a Trump spokesperson and former campaign staffer Corey Lewandowski in May 2016.

Get Breaking News Delivered to Your Inbox

Nunberg responded to these claims in an affidavit, stating the lawsuit was "retaliation" for his decision to endorse Sen. Ted Cruz over Trump during the primary season.

The Trump campaign fired Nunberg in August 2015, claiming that he posted racist remarks on Facebook.

Despite their troubled past, Nunberg said he'll still be voting for Donald Trump in November's presidential election.