WASHINGTON — The Justice Department charged two Virginia men on Saturday with terrorism-related offenses, one day after F.B.I. agents arrested one of them at an airport where officials believe he was planning to begin a journey to Syria to fight with the Islamic State.

Both men, Joseph Hassan Farrokh and Mahmoud Amin Mohamed Elhassan, are in F.B.I. custody and face up to 20 years in prison if they are convicted, the Justice Department said Saturday in a news release.

The department did not cite any evidence that the two men had direct contact with operatives for the Islamic State, also known as ISIS or ISIL, and seemed to base the terrorism charges in large part on conversations they had with three F.B.I. informants.

The arrests came as counterterrorism officials reported that the number of Americans trying to get to Syria and Iraq to fight with the Islamic State has fallen off. In 2014, about nine Americans a month tried to leave to join the group. For several months in the second half of last year, that number dwindled to a few a month.