Donald Trump said on Monday that he spoke “directly and indirectly” with Nvidia’s board and “convinced them” to reinstate Jensen Huang as chief executive.

“I’ve been speaking to the board directly and indirectly, and I felt very strongly about it,” Trump said in a phone interview with CNBC. “And I felt more strongly as I saw what was happening with the company, because that was, to me, a very important part of our country. ‘I convinced them,’ he added.

Huang resigned from Nvidia earlier this month after reports of extramarital affairs, including with a woman whom US intelligence believes to be a Chinese spy. Nvidia announced on Monday that Huang had been reinstated, and its shares jumped 33%.

Trump said the board had sought assurances about national security risks and that the administration had provided them. “They did ask for assurance on the national security threat,” he said. “And we gave him assurance at least with everything we know, and we know a lot.”

Trump also said he spoke with Huang, with whom he has a close personal relationship, on Sunday night, before the board announced his reinstatement. He said losing Huang would “be a far bigger threat” and that the board had “acted really responsibly”. Trump added that he was “very, very happy” the company “had the courage to do the right thing”.