For six years, New Jersey state auditors and lawyers battled in court for $30 million that the state said Donald Trump's Atlantic City casinos owed in back taxes.

The state eventually agreed to accept only $5 million from the casinos.

The settlement came just a year after Governor Chris Christie took office, according to an investigation by the New York Times that reviewed the casinos' bankruptcy filings.

The tax battle began shortly after the casinos filed for bankruptcy in 2004, when the state noticed that the company should have been paying much more money, namely due to a new corporate state tax that went into effect in 2002, reports the Times.

The legal battle dragged on for several years — while the casinos again filed for bankruptcy in 2009 and 2014 — until the parties finally agreed to the lower settlement in December 2011, the Times reports.

RELATED: Celebrities who've endorsed Donald Trump



11 PHOTOS 20 celebrities who endorse Donald Trump See Gallery 20 celebrities who endorse Donald Trump Stephen Baldwin

Baldwin, who was fired by Trump on two different seasons of "The Celebrity Apprentice," said during an interview with Don Lemon on an episode of "CNN Tonight" that Trump would make a "great" president "because he's not a politician, and he doesn't care what anybody thinks." Photo via Getty Gary Busey The actor endorsed Trump back in 2011, even after being fired from season four of "The Celebrity Apprentice," and offered his praise for the presidential hopeful again recently. "He's a great guy. He's sharp. He's fast," he told Fox411. "He can change the country after the last eight years." Photo via Getty Dennis Rodman The retired pro-basketball player tweeted: "@realDonaldTrump has been a great friend for many years. We don't need another politician, we need a businessman like Mr. Trump! Trump 2016." He was fired from season two of "The Celebrity Apprentice." Photo via Getty Lou Ferrigno When asked by TMZ for his thoughts on Trump, the actor and former bodybuilder said, "I hope Donald goes all the way." He was also fired from a season of "The Celebrity Apprentice." Photo via Getty Ted Nugent The musician wrote an article for WorldNetDaily in which he said, "[Trump] should be given the Medal of Freedom for speaking his mind in such a bold, honest, and straightforward manner." Photo via Getty Tila Tequila The model and reality star posted a video on YouTube expressing her support for Trump. Photo via Getty Wayne Newton The Las Vegas entertainer announced his support on "Fox and Friends," “I love Donald, and he would make a great president,” he said. But he also voiced his support for other hopefuls, such as Carly Fiorina, Jeb Bush, and Ben Carson. Photo via Getty Willie Robertson The businessman and star of A&E’s “Duck Dynasty” supported Trump at a rally in Oklahoma last year, where he was invited up on stage. He officially announced his endorsement in January. Photo via Getty Jesse Ventura Jesse Ventura The former pro wrestler, former Minnesota governor, and actor was speaking with previous Trump staffer Roger Stone for "Off the Grid," when Ventura said, "I shocked my staff today. I came in and said, ‘You know what, as far as the Republicans are concerned, I hope Trump wins.'" Though he also added, "Now I’m not a Republican — I’m not a Democrat either — so ultimately, I’d like somebody else to win overall.” Photo via Getty Terrell Owens The retired NFL wide receiver told TMZ Sports, "This may be what the country needs and Trump... He’s a guy who won’t put up with B.S. and has what it takes to change how government is run." He appeared on the most recent season of "The Celebrity Apprentice." Photo via Getty Up Next See Gallery Discover More Like This HIDE CAPTION SHOW CAPTION of SEE ALL BACK TO SLIDE

Christie was sworn in as governor on January 2010.

A spokesman for New Jersey's attorney general's office told the Times they accepted the lower settlement because the casino industry had been on the decline since 2006, so they didn't think they would get a higher amount if the court case proceeded.

The casinos made Trump millions, a previous Times investigation found, but were largely failed businesses with huge amounts of debt. Trump has since sold his shares in the casinos, but they still bear his name.

Christie and Trump have known each other since 2002.

NOW WATCH: DATA SCIENTIST: There's an easy way to tell if one of Trump's tweets came from him or his campaign

More from Business Insider:

SEE ALSO: Donald Trump's casino business in Atlantic City was a 'protracted failure'

NEXT: Carl Icahn flees Atlantic City after burning $100 million on the Trump Taj Mahal