Judge John Primomo was presiding over a citizenship ceremony at the Institute of Texan Cultures in San Antonio when he commented on the outcome of the US election.
In footage obtained by KENS 5 News, the federal judge can be heard telling the new citizens: “I can assure you, that whether you voted for him or you did not vote for him, if you are a citizen of the United States, he is your President.
“He will be your President, and if you do not like that you need to go to another country.”
He later reportedly said his words were meant to be unifying.
Mr Trump has vowed to crack down on immigration and has reaffirmed his campaign pledge to build a wall between the US and Mexico – although he has conceded parts of it may just be a fence.
During the White House race he also pledged to ban Muslims from entering the country and vowed to block those who sympathise with extremist groups or who fail to embrace American values.
However, those taking part in Thursday’s citizenship ceremony, which involved taking an oath of allegiance to officially complete the naturalisation process, had a more positive outlook.
Mohammed al Fayyadh, originally from Iraq, told the news channel: “It is exciting to be an American.
“I believe America is bigger than whoever is in office.”
Rafael Guerra, born in Mexico, added: “The essence of Americans is that you have the right to vote and choose who you want to represent you.”