The Times discovered the agreement during a review of the thousands of documents filed in the bankruptcies of Mr. Trump’s casinos. The taxes went unpaid from 2002 through 2006, during which time Mr. Trump was leading the company as chairman and, until 2005, as its chief executive. He reaped millions of dollars in fees and bonuses from the company, even as it underperformed competitors, lost money every year and saw its stock collapse.

Mr. Trump and Mr. Christie met in 2002, when Mr. Christie was the United States attorney for New Jersey. Mr. Trump’s sister Maryanne Trump Barry, then a federal judge in the state, had mentioned to Mr. Christie that her famous brother would like to meet him. They struck up a friendship. Mr. Christie was invited to Mr. Trump’s third wedding in 2005, and Mr. Trump was a prominent guest at Mr. Christie’s inauguration in 2010. They have double dated with their wives.

Their bond has occasionally included financial largess from Mr. Trump. His foundation made large donations to the Drumthwacket Foundation, which finances maintenance and improvements to New Jersey’s historic governor’s residence, after Mr. Christie became its honorary chairman. Mr. Trump also made large contributions to the Republican Governors Association when Mr. Christie was its chairman.

After attacking Mr. Christie during the recent Republican primary contest, Mr. Trump seriously considered choosing him as his running mate before picking Gov. Mike Pence of Indiana. But Mr. Christie has remained a vocal supporter and was given a prominent speaking role at the Republican National Convention in Cleveland, and Mr. Trump has given his friend the task of heading his transition committee.

“Donald and I, along with Melania and Mary Pat, have been friends for over a decade,” Mr. Christie said when he endorsed Mr. Trump in February. “He has been a good and loyal friend.”

The state corporate tax at the center of the dispute went into effect in 2002. It was called the alternative minimum assessment and was created, in part, to prevent businesses from avoiding taxes through accounting maneuvers.