A Pakistani citizen has been arrested in Canada and charged with plotting a terrorist attack in New York City.

According to the U.S. Department of Justice, Muhammad Shahzeb Khan, 20, also known as Shazeb Jadoon, resided in Canada and attempted to enter the U.S. to carry out a mass shooting at a Jewish centre in Brooklyn.

Khan was arrested by Canadian police near the border in Quebec on Sept. 4, according to U.S. authorities, who are now seeking his extradition.

"The defendant is alleged to have planned a terrorist attack in New York City around October 7th of this year with the stated goal of slaughtering, in the name of ISIS, as many Jewish people as possible," U.S. Attorney General Merrick B. Garland said in a news release on Friday. "As I said to Canada's Minister of Public Safety yesterday, we are deeply grateful to our Canadian partners for their critical law enforcement actions in this matter."

The target of an FBI investigation, Khan has been charged with attempting to provide material support and resources to a designated foreign terrorist organization. He faces a maximum sentence of 20 years in prison if convicted.

A complaint filed with a New York federal court alleges that Khan began showing his support for ISIS on social media around November 2023. He subsequently started communicating with two undercover law enforcement officers, who were told that "New york is perfect to target jews" because it has the "largest Jewish population In America."

Khan allegedly intended to use automatic and semi-automatic weapons to carry out a mass shooting on or around the one-year anniversary of the Oct. 7, 2023, Hamas-led attack on Israel. He allegedly discussed specific plans with the undercover officers, urged them to secure firearms and claimed he was paying a human smuggler to sneak him into the U.S.

In messages to the officers, Khan allegedly wrote that he had "been praying for martyrdom" and that "if we succeed with our plan this would be the largest Attack on US soil since 9/11."

Khan was arrested in Ormstown, Que., approximately 20 kilometres from the U.S. border, after travelling in three separate vehicles from in or around Toronto. The driver of the vehicle and an additional female passenger have not been identified.

Khan is scheduled to appear at a Montreal court on Sept. 13.

"With the strong partnership between Canada and the U.S., we can reassure the public that as his actions escalated, at no point in time was Khan an immediate threat prior to his arrest," the RCMP said in a news release. "The RCMP continues to work in collaboration with our domestic and international partners to detect, investigate and disrupt criminal acts that are targeting Jewish Communities."

In a statement on X, Public Safety Minister Dominic LeBlanc said the arrest was a product of the strong partnership between the FBI and RCMP.

"Jewish Canadians and Jewish Americans deserve to be safe in their communities," LeBlanc wrote. "Canada will never tolerate hate, violent extremism or terrorism."

B'nai Brith Canada, a Jewish service organization, released a statement Friday evening saying it had been briefed on the arrest by law enforcement and federal officials. The statement claimed Khan was residing in Canada on a student visa.

"Our government must act immediately to prevent the entry into Canada of those who harbour radical views and to prevent the further radicalization of its citizens," the organization said. "Canada is becoming a breeding ground for terrorists. There can be no more excuses. The safety and security of our nation must remain paramount."

In an email to CTVNews.ca, Immigration, Refugees and Citizenship Canada would not confirm Khan's status in the country, saying it does not comment on active investigations or individual cases.

The RCMP said other domestic partners instrumental in the arrest included CSIS, Peel Regional Police, Ontario Provincial Police and the Canada Border Services Agency.

Khan was arrested under the Criminal Code for attempting to leave Canada to commit an offence for a terrorist group, participating in the activities of a terrorist group and conspiracy to commit an offence by violating U.S. immigration law.