Democratic presidential hopeful Julián Castro called President Trump Donald John TrumpBiden on Trump's refusal to commit to peaceful transfer of power: 'What country are we in?' Romney: 'Unthinkable and unacceptable' to not commit to peaceful transition of power Two Louisville police officers shot amid Breonna Taylor grand jury protests MORE a "grade-A idiot" on Thursday over the president's reaction to a person who suggested shooting migrants at one of his rallies.

“The president is being a grade-A idiot,” Castro said in an interview with Mother Jones.

ADVERTISEMENT

“We’ve seen so many white supremacists go out there and say that they’re inspired by President Trump and shoot people and so he’s being a grade-A idiot to continue to foster the flames of divisions like that," the former Housing and Urban Development secretary added. “That is unbecoming of a president, of anybody in public office.”

Trump on Wednesday held a rally in Panama City Beach, Fla., located in the state's panhandle, during which he noted that Border Patrol agents are not permitted to carry weapons while working to deter illegal border crossings.

“But how do you stop these people? You can’t,” he said, at which point, someone in the crowd responded “Shoot them!”

Trump smiled and shook his head while the crowd cheered.

“That’s only in the Panhandle you can get away with that statement,” the president joked. “Only in the Panhandle.”

Castro is among more than 20 Democrats running for president in 2020.

Updated May 10, 1:00 p.m.