A Virginia man who was allegedly attempting to travel to Syria to join Islamic State and a man accused of helping him have been arrested.

Prosecutors said in a statement on Saturday that 28-year-old Joseph Hassan Farrokh was arrested on Friday at the airport in Richmond, Virginia. Officials said his ultimate destination was Syria. Officials also arrested 25-year-old Mahmoud Amin Mohamed Elhassan, who they say drove Farrokh to Richmond. Both men are from Woodbridge, Virginia.

Farrokh, a US citizen born in Pennsylvania, has been charged with attempting to provide material support and resources to a designated foreign terrorist organization. Elhassan, a legal permanent US resident originally from Sudan, has been charged with helping Farrokh. They are scheduled to make their first appearance in federal court in Alexandria, Virginia, on Tuesday.

Prosecutors said that if convicted, Farrokh and Elhassan each face a maximum penalty of 20 years in prison.

Attempts to reach their families for comment were unsuccessful on Saturday.

According to court documents filed in the case, Farrokh asked for help getting to Syria from a person who he didn’t know was an informant for the FBI. He later met with two other FBI informants he believed were people who could help him join Isis.

Court documents say Farrokh expressed concerns about trusting the men and said he didn’t want to go to jail. At one meeting with them, however, he agreed to swear an oath of allegiance, court documents said. He also allegedly said that he wanted to die a martyr but did ask if his wife and family could eventually join him in Syria.

He said he had other ways to get to Syria in the past that weren’t secure and needed a connection because he didn’t want to get arrested.

Farrokh made plans to travel from Richmond to Chicago and from there to Jordan, where he was told he would be met by a contact. He asked the opinion of one of the FBI informants of his plan to buy a round-trip plane ticket and reserve a hotel room in Jordan, to minimize suspicion.

He also allegedly said he planned to trim and style his beard to appear more American and agreed to fly out of a smaller airport to avoid what he believed would be stricter scrutiny at a large airport.

On Friday, Elhassan allegedly picked Farrokh up from his home and drove him in a taxi to about a mile from the Richmond airport, where a second taxi picked him up. Court documents say Elhassan had warned Farrokh to be careful about what he said about Isis over the phone and expressed concern that law enforcement authorities might be listening to his conversations.

Elhassan also allegedly knew that while Farrokh intended to go to Syria, he was telling family he was traveling to Saudi Arabia to study.

When questioned by FBI agents after he dropped Farrokh off, Elhassan said Farrokh was traveling to California to attend a funeral and would be back in two weeks, court documents said. Elhassan also lied about the airport Farrokh was flying out of, saying he was flying out of Dulles airport, near Washington, court documents said.