"I've tapped into something and I've tapped into illegal immigration," the Republican presidential candidate said in a June 16 deposition for a lawsuit against a celebrity chef who dropped out of the restaurant venture at his new hotel.

Chef Geoffrey Zakarian pulled out after Trump's June 15, 2015 comments as he announced his bid for the White House.

Trump said Zakarian may have missed an opportunity.

"If he had the restaurant, it would be helped instead of hurt" by the comments, Trump said in the deposition.

Zakarian, who has appeared in cooking shows like "The Next Iron Chef," "Chopped" and "Top Chef," signed a deal with Trump to open the restaurant in the historic Old Post Office building near the White House, which Trump won the right to lease and renovate from the U.S. government.

The project, called the Trump International Hotel, opened on Sept. 12, almost a year after it was originally expected to begin operating.

Zakarian backed out in July 2015, after the speech Trump gave on June 16, 2015 announcing his candidacy and bemoaning the flow of people across the southern U.S. border. Zakarian said Trump's comments were out of sync with his "personal core values."

Several companies, including Macy's Inc, broadcaster NBC and stock car racing organization NASCAR, also cut ties with Trump after his comments.

Trump, through his subsidiary operating the hotel, sued Zakarian, alleging the broken deal cost him more than $10 million.

In the deposition, Trump also said his comments about Mexicans illegally crossing the border had helped him win the Republican presidential nomination, a sign his views were "pretty mainstream."

The case is Trump Old Post Office LLC et al v. CZ-National LLC, et al, District of Columbia Superior Court.

(Reporting by Emily Flitter; Editing by Jonathan Oatis)