President Biden accidentally commended China instead of Canada while praising the nation's stance on migration on Friday.

Biden made the gaffe during a speech at the Canadian Parliament in Ottawa while he was discussing U.S. immigration policies.

"In the United States, we're expanding legal pathways for migration, to seek safety and humanitarian…humanitarian basis, while discouraging unlawful migration that feeds exploitation and human trafficking," the president began.

"So today, I applaud China for stepping out...excuse me, I applaud Canada," Biden stumbled while Canadian Members of Parliament laughed.

HOUSE LAWMAKERS FOCUS ON ‘OUTCOMPETING CHINA’ IN BIPARTISAN VISIT TO GUYANA

Biden touching eyes during presser

US President Joe Biden pauses during a joint press conference with Canada's Prime Minister Justin Trudeau at the Sir John A. Macdonald Building in Ottawa, Canada, on March 24, 2023.  (Andrej Ivanov/AFP via Getty Images)

"You can tell what I'm thinking…about China. I won't get into that yet," Biden said. "I applaud Canada's stepping up of similar programs."

Biden did not reference China again during his address to Parliament, but Prime Minister Justin Trudeau noted China's competitive edge before Biden began speaking.

CHINA FLEXES MUSCLES IN LATIN AMERICA IN LATEST SECURITY CHALLENGE TO US

Biden speaking in Canada

US President Joe Biden addresses the Canadian Parliament in Ottawa, Canada, on March 24, 2023. (Mandel Ngan/Pool/AFP via Getty Images)

"Economic policy is climate policy is security policy, with growing competition, including from an increasingly assertive China," Trudeau said. "There's no doubt why it matters that we turn to each other now to build up a North American market on everything from semiconductors to solar panel batteries."

Biden's speech comes as tensions between the U.S. and China continue to escalate. Chinese officials threatened the U.S. Navy with "serious consequences" on Friday after an American warship was spotted in the South China Sea.

Biden talking to Trudeau

US President Joe Biden speaks with Canadian Prime Minister Justin Trudeau following his address to the Canadian Parliament in Ottawa, Ontario, Canada, on March 24, 2023.  (Kenny Holston/Pool/AFP via Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

Fox News Digital reached out to the White House for a statement, but has not heard back.