Trump's remarks followed a series of social media posts from Musk, the CEO of Tesla and SpaceX, who vowed to go to "war" to defend the visa program for foreign tech workers.
Trump, who moved to limit the visas' use during his first presidency, told The New York Post on Saturday he was likewise in favour of the visa program.
"I have many H-1B visas on my properties. I've been a believer in H-1B. I have used it many times. It's a great program," he was quoted as saying.
Trump moved to limit the use of the H-1B visa during his first presidency. (AP PHOTO)
Musk, a naturalised US citizen born in South Africa, has held an H-1B visa, and his electric-car company Tesla obtained 724 of the visas this year. H-1B visas are typically for three-year periods, though holders can extend them or apply for green cards.
The altercation was set off earlier this week by far-right activists who criticised Trump's selection of Sriram Krishnan, an Indian American venture capitalist, to be an adviser on artificial intelligence, saying he would have influence on the Trump administration's immigration policies.
Musk's tweet was directed at Trump's supporters and immigration hard-liners who have increasingly pushed for the H-1B visa program to be scrapped amid a heated debate over immigration and the place of skilled immigrants and foreign workers brought into the country on work visas.
On Friday, Steve Bannon, a longtime Trump confidante, critiqued "big tech oligarchs" for supporting the H-1B program and cast immigration as a threat to Western civilisation.
In response, Musk and many other tech billionaires drew a line between what they view as legal immigration and illegal immigration.
Trump has promised to deport all immigrants who are in the US illegally, deploy tariffs to help create more jobs for American citizens and severely restrict immigration.
The visa issue highlights how tech leaders like Musk -- who has taken an important role in the presidential transition, advising  on key personnel and policy areas -- are now drawing scrutiny from his base.
The US tech industry relies on the government's H-1B visa program to hire foreign skilled workers to help run its companies, a labour force that critics say undercuts wages for American citizens.
Musk has spent more than a quarter of a billion dollars helping Trump get elected in November. He has posted regularly this week about the lack of homegrown talent to fill all the needed positions within American tech companies.