BANGOR  — A Florida man accused of causing a trans-Atlantic flight to be diverted to Maine is due in federal court for a detention hearing.

Prosecutors say Derek Stansberry got the attention of the flight crew when he passed along a note that said he had a fake passport. Later, he told air marshals that he had dynamite. The April 27 flight from Paris to Atlanta ended up landing at Bangor International Airport.

Defense lawyer Virginia Villa initially sought a competency hearing but she now says that he’s competent. He’ll appear before a magistrate judge Wednesday.

The former Air Force intelligence specialist was working for a defense contractor in Africa. Villa says his actions are out of character based on everything she’s learned about Stansberry.