Muhammad Masood, 28, was charged with one count of attempting to provide material support to a foreign terrorist organization.

MINNEAPOLIS — A doctor who was working as a research coordinator at a medical clinic in Rochester, Minnesota, was arrested Thursday on terrorism charges, after prosecutors say he told others that he pledged his allegiance to the Islamic State group and wanted to carry out “lone wolf” attacks in the United States.

Muhammad Masood, 28, was arrested at the Minneapolis-St. Paul International Airport on Thursday by FBI agents and was charged with one count of attempting to provide material support to a foreign terrorist organization.

Prosecutors say Masood, who is a licensed medical doctor from Pakistan, was in the U.S. on a work visa. They allege that starting in January 2020, Masood made several statements to others, pledging his allegiance to the Islamic State group and its leader. He expressed his desire to travel to Syria to fight for ISIS and a desire to carry out “lone wolf” attacks in the U.S.

Prosecutors say Masood bought a plane ticket on Feb. 21 to travel from Chicago to Amman, Jordan, and then planned to go to Syria from there. But on March 16, he had to change his travel plans because Jordan closed its borders due to the coronavirus pandemic. Masood switched his plans to fly from Minneapolis to Los Angeles to meet with someone who he believed would help him travel in a cargo ship into Islamic State territory.

He was arrested Thursday at the airport after he checked in for his flight to Los Angeles. His attorney, Manny Atwal, had no immediate comment.

Prosecutors do not name the clinic where Masood worked, but a LinkedIn page for a man with the same name and work history says Masood has worked at the Mayo Clinic since February of 2018, first as a research trainee, but has been a clinical research coordinator since last May. A profile on researchgate.net says he has done research in cardiology, and he was scheduled to present his research for the Mayo Clinic School of Continuous Professional Development in October 2018, according to an online calendar of the event.

A message left at the Mayo Clinic was not immediately returned.