Tesla CEO Elon Musk said he respected the U.S. judicial process, but chuckled when asked if he felt the same about the Securities and Exchange Commission as he entered a courthouse Thursday for a showdown with the federal agency. Musk was in New York for a hearing on contempt charges requested by the SEC after it said he violated the terms of its October settlement over securities fraud. Musk tweeted about the company's production forecasts on Feb 19, despite agreeing to stop using Twitter to make statements about Tesla's operations or financial position without company review and approval.

Tesla CEO Elon Musk arrives at federal court, April 4, 2019 in New York City. A federal judge will hear oral arguments this afternoon in a lawsuit brought by the U.S. Securities and Exchange Commission (SEC) that seeks to hold Musk in contempt for violating a settlement deal. Drew Angerer | Getty Images

"I have great respect for the justice system and I think the judges in the American system are outstanding," Musk told reporters before entering the courthouse in lower Manhattan. When CNBC's Phil LeBeau asked Musk if he felt the same about the SEC, the CEO laughed and walked away. Securities lawyers and other industry executives have said that Musk, who has already been removed as chairman, could also lose his post as CEO over his latest skirmish with the SEC.

Elon Musk, chief executive officer of Tesla Inc., center, arrives at federal court in New York, on Thursday, April 4, 2019. Jeenah Moon | Bloomberg | Getty Images