BANGOR — A former Air Force intelligence specialist whose claim of possessing explosives forced a trans-Atlantic flight to land in Maine is due in federal court.

Both the defense and prosecution agree that a break from reality led to Derek Stansberry’s ramblings aboard the Paris-to-Atlanta in April 2010. They’ll make their case today to U.S. District Judge John Woodcock, who’ll decide whether to accept Stansberry’s insanity defense.

The Airbus A330 diverted to Bangor after Stansberry gave a rambling note to a flight attendant and then responded “yes” when federal air marshals asked if he had explosives.

Stansberry later said he made up the story to divert attention from classified information he allegedly possessed. At the time, the Florida man was returning home from Africa, where he’d been working for a defense contractor.