A far-right opposition Dutch lawmaker, who for years has lived under round-the-clock protection because of death threats sparked by his fierce anti-Islam rhetoric, canceled a planned Prophet Muhammad cartoon contest Thursday, following concerns of extreme threat.

“To avoid the risk of victims of Islamic violence, I have decided not to let the cartoon contest go ahead,” Geert Wilders said in a written statement, noting he did not want others endangered by the contest he had planned for November.

The contest was to have been held at the tightly guarded offices of his Party for Freedom in the Dutch parliament building.

“It’s not just about me,” Wilders, who has a history of inflammatory statements about Islam, said in the statement. Strong opponents of the event “see not only me, but the entire Netherlands as a target.”

He followed up the statement later in the day with a tweet saying: “Islam showed its true face once again with death threats, fatwas and violence. However, the safety and security of my fellow countrymen comes first.”

The Dutch government had been at pains to distance itself from the contest.

Prime Minister Mark Rutte last week questioned Wilders’ motive for organizing the contest.

“His aim is not to have a debate about Islam. His aim is to be provocative,” the prime minister said.

However, Rutte added that people in the Netherlands have far-reaching freedom of speech rights, and the government did not intend to seek the contest’s cancellation.

The planned contest sparked a death threat this week from a 26-year-old man, reportedly a Pakistani, who was arrested Tuesday in The Hague.

Earlier Thursday, a Dutch judge extended by two weeks the detention of the man who allegedly threatened to attack Wilders.

Prosecutors said in a statement that an investigating judge ordered the suspect held while he was investigated on charges of making a terrorist threat, making preparations for a terrorist murder and incitement.

Wilders also attended an event with conservative blogger Pamela Geller, a vocal critic of radical Islam, right before a terrorist attack in Garland, Texas in 2015, a target because Geller organized a Prophet Muhammad cartoon contest. During the contest, two men opened fire outside and wounded a security guard before they were killed in a shootout with law enforcement assigned to guard the event.

“I always said that what has happened in Europe will also happen in America if you don’t stop Islam,” said Wilders at the time.

Physical depictions of the prophet are forbidden in Islam, and seen as deeply offensive to Muslims.

Some 10,000 supporters of the Tehreek-i-Labaik group, which helped Imran Khan to become prime minister of Pakistan following last month’s national elections, set out on the march Wednesday, calling on Khan to cut diplomatic ties with the Netherlands.

Pakistan’s government had vowed to protest the contest at the U.N.

In a clear indication of the anger Wilders had generated, thousands of hard-line Islamists marched toward Pakistan’s capital Thursday in protest. The demonstrators were expected to camp out near Islamabad later Thursday.

Officials blocked the capital’s key roads by putting out shipping containers to prevent demonstrators from reaching near the area where the Dutch and other foreign embassies are located.

Earlier, police halted the march in Jhelum, about 100 miles from Islamabad, but later it was allowed to resume, party spokesman Eijaz Ashrafi told The Associated Press.

He said they refused to disperse, saying the police will have to “kill us” to stop the march.

Ashrafi said they told Khan’s government that it had two options: Cut diplomatic ties with the Netherlands or kill them and “send our dead bodies to Lahore.”

“So far, better sense has prevailed,” he said. “We are 50 miles away from Islamabad.”

The party’s firebrand chief Khadim Hussain Rizvi in Jhelum also warned Khan to remove any hurdles.

“We are on roads to show to the world that we can die to protect the honor of our Prophet,” he told demonstrators.

The rally came as emotions ran high in Pakistan against the cartoon contest.

Pakistan’s Foreign Ministry spokesman Mohammad Faisal said Thursday that Islamabad conveyed its deep concern to Netherlands over the planned cartoon contest. He said the contest was a “deliberate and malicious attempt to defame Islam.”

However, Faisal said Pakistan would avoid any unnecessary extreme action against Netherlands over the contest.

The Associated Press contributed to this report.