A former medical coordinator for Mayo Clinic was arrested at Minneapolis-St. Paul International Airport on Thursday while trying to get to Syria to fight “on the front line” of ISIS.

The FBI arrested 28-year-old Muhammad Masood after he checked in for his flight to Los Angeles. The U.S. Attorney’s Office in Minnesota has charged Masood with attempting to provide material support to a designated foreign terrorist organization, including wanting to serve as a fighter and combat medic and talking of his desire to enact a lone wolf-style attack. Masood made his first appearance in court Thursday.

Masood is a licensed medical doctor in Pakistan working in the United States on an H-1B Visa for the past two years in the Mayo Clinic Department of Cardiovascular Diseases. In a statement Thursday, Mayo Clinic communications manager Ginger Plumbo said that Masood was not a Mayo Clinic employee at the time of his arrest. It is unclear when his employment ended.

From January to March, Masood made several statements pledging his allegiance to ISIS and its leader, according to charges.

“i want to fight on the front line as well as help the wounded brothers,” he said over an encrypted social media app to confidential informant sources, according to charges. “as i doctor i want to help mujahedeen [sic] on the ground,” he wrote. According to charges, “mujahedeen” refers to those engaged in jihad.

On Feb. 19, Masood traveled to Bloomington to meet with a confidential informant he believed would help him join ISIS. They met in the parking lot of a shopping mall and drove to a nearby hotel. They patched in another informant via video conference, who Masood believed to be an overseas commander vetting him.

In the interview, Masood said he’d been “looking for the truth” and listening to lectures from Anwar al Awlaki, a senior al-Qaida recruiter killed in a 2011 drone strike, according to charges. Masood said he wanted to be “a combat medic … and also fight.” He then pledged a “bayat,” or solemn promise, to ISIS, and said he wanted to travel to Syria to fight on the terrorist organization’s behalf.

According to the complaint, Masood wrote that because he was currently in the United States, “sometimes i (want to) attack enemy when I am behind enemy (lines) itself’ ” because “not many people cant [sic] even reach here to attack.”

He also allegedly noted that he will lose the chance to conduct an attack in the United States, writing “i wonder if I will miss the opportunity of attacking the enemy when I was in the middle of it.”

According to the complaint, Masood wrote that he hates smiling at passing people “just to not make them (suspicious.) … I cannot tolerate it anymore.”

Two days after the meeting with the informants, he bought a plane ticket from Chicago to Amman, Jordan, with plans to connect to Syria, according to the charges.

But on March 16, Jordan closed its borders to incoming travel due to the COVID-19 pandemic, forcing Masood to change his plans. He instead made arrangements to travel to Los Angeles to meet with an individual he believed would assist him with travel via cargo ship to deliver him to ISIS territory.

Members of an FBI anti-terrorism task force arrested him after he checked in for his flight. The federal court system in Minnesota is suspended to reduce the spread of COVID-19, but a judge made a special exception in this case. Masood is scheduled to appear in court again Tuesday for a formal detention hearing.

Staff writer Paul Walsh contributed to this report.