President Donald Trump in March reportedly suggested soldiers shoot migrants in the leg in order to prevent them from crossing the U.S.-Mexico border, according to a new book, an excerpt of which The New York Times published on Tuesday.

“Privately, the president had often talked about fortifying a border wall with a water-filled trench, stocked with snakes or alligators, prompting aides to seek a cost estimate,” write Times journalists Michael D. Shear and Julie Hirschfeld Davis in their forthcoming book, “Border Wars: Inside Trump’s Assault on Immigration.”

The authors continue: “He wanted the wall electrified, with spikes on top that could pierce human flesh. After publicly suggesting that soldiers shoot migrants if they threw rocks, the president backed off when his staff told him that was illegal. But later in a meeting, aides recalled, he suggested that they shoot migrants in the legs to slow them down. That’s not allowed either, they told him.”

The White House didn’t immediately return a request for comment.

Trump later laughed at the idea of shooting migrants, telling those gathered for a rally in Florida: “Only in the Panhandle you can get away with that statement.”

But the president allegedly made that very suggestion to White House advisers in a March meeting, around the same time he ordered them to shut down the southern border by the following day.

“I will close the border if Mexico doesn’t get with it,” Trump said at a news conference in Florida on March 29.

The president had threatened to shut down the border before but later backed off the idea as the Department of Homeland Security indicated it had no intention of doing so.

Aides also swiftly told Trump that shooting migrants was not an option.

“The president was frustrated, and I think he took that moment to hit the reset button,” Thomas D. Homan, who served as Trump’s acting director of Immigration and Customs Enforcement, told Shear and Davis. “The president wanted it to be fixed quickly.’’

About 65% of the immigrants detained for crossing the southern border without documentation in February were either families or children traveling alone, according to Customs and Border Protection statistics.

At the rally in May, Trump appeared to lament his inability to order border patrol agents to shoot immigrants at will. He painted a picture of a theoretical situation in which two Border Patrol agents might be up against “15,000 people marching up,” then noted that he was not allowed to “let them use their weapons.”

The president has a long history of violent rhetoric about immigrants. In November 2018, Trump said soldiers stationed at the border should be able to “fight back” by opening fire if migrants threw rocks at them.

“They want to throw rocks at our military, our military fights back,” Trump told reporters at the White House. “I told them to consider it a rifle. When they throw rocks like what they did to the Mexican military and police, I say consider it a rifle.”

The president has consistently described migrants as criminals, gang members and rapists, and has described their attempts to cross the border as an “invasion.”

Trump’s comments have received renewed scrutiny in the wake of a shooting in El Paso, Texas, in August that killed more than 20 people and left dozens injured. The shooter said he was targeting Mexicans and had posted a racist manifesto online railing against the influx of migrants to the U.S.

A homegrown militia has also sprung up at the southern border and appears to be awaiting for an endorsement to shoot migrants entering the country. “Why are we just apprehending them and not lining them up and shooting them?” Armando Gonzalez, a member of the United Constitutional Patriots, allegedly asked another militiaman, according to a police report obtained by The Young Turks in May.