The Secret Service is “aware” of a tweet attacking President Trump’s adolescent son that was posted by the actor Peter Fonda, a spokesman for the agency said on Wednesday.

“We should rip Barron Trump from his mother’s arms and put him in a cage with pedophiles,” Mr. Fonda wrote in all caps, referring to the president’s 12-year-old son, in a recent post on Twitter that was later deleted. Mr. Fonda, 78, also wondered if such an act would prompt the first lady Melania Trump to “stand up against” her husband.

The spokesman for the agency said that “as a matter of practice, the Secret Service does not confirm the existence or the status of an investigation.”

In recent days, Mr. Fonda has used Twitter to urge mass protests and to rail against the Trump administration’s “zero tolerance” policy, which has separated immigrant children from parents who crossed illegally into the United States, a practice that drew wide-ranging criticism from both parties, including Mrs. Trump. On Wednesday, Mr. Trump signed an executive order intended to end the separation of families at the border by detaining parents with their children for an indefinite period.