Curt Schilling shared his opinions on Facebook again. (Elise Amendola/AP)

The New York City bombing and other incidents over the weekend prompted Curt Schilling, the former Major League Baseball pitcher whose outspokenness led to his dismissal by ESPN, to take to Facebook to offer his solution to terror: suspend immigration and subject people accused of terrorism to execution without benefit of a trial.

“You must, immediately, suspend immigration. You must, immediately, deploy national guard to points of entry and border crossings,” he wrote. “You must immediately stop ALL foreign nationals from entering this country via air.”

Schilling, who found himself in trouble with his former employer for sharing memes and strong opinions on social media, advocates new rules for those seeking to move to the U.S.:

“Unless an immigrant can PROVE beyond a shadow of a doubt no links with terrorism, they cannot come here. You must immediately detain ANY and ALL illegal aliens linked to terrorism or terrorists, and ANY and ALL illegal aliens who have a felony on their record. You immediately return these illegals to their ‘home country.’ ”

And, in addition to supporting the building of “a version of the Berlin Wall on our southern border,” he wants to see stern punishment for offenders.

“Anyone doing ANYTHING resembling the events of yesterday? You do not get your ‘rights’ under the law, you become an enemy combatant. Which means ‘No alien unlawful enemy combatant subject to trial by military commission under this chapter may invoke the Geneva Conventions as a source of rights.’ The defendant does not have the right to file Habeas Corpus petitions and can receive the death penalty.

Schilling was fired by ESPN in April for what the network deemed to be “unacceptable conduct” after a series of incidents. He was taken off ESPN’s baseball coverage in September 2015 after he shared a meme that compared extremism in today’s Muslim world to Nazi Germany in 1940.

In March, Schilling told a radio station that Hillary Clinton “should be buried under a jail somewhere,” in apparent violation of an ESPN policy on commentary relating to the presidential election. However, the network allowed the former pitcher to keep his position as an analyst on Monday baseball telecasts.

Then, he weighed in on so-called bathroom laws, a move that apparently was the last straw. He had shared a meme, presumably created by someone else, of a man in a wig and an unusual, tight outfit, adding a comment that made clear his feelings on the matter.

“A man is a man no matter what they call themselves,” Schilling wrote then. “I don’t care what they are, who they sleep with, men’s room was designed for the penis, women’s not so much. Now you need laws telling us differently? Pathetic.”