Former New York Ranger Sean Avery was detained at Newark Airport customs Tuesday morning after he was denied clearance to ­re-enter the United States via the expedited Global Entry program.

Avery had been traveling with Provocateur nightclub co-owner Michael Satsky to ­Toronto to scope out a potential club and restaurant deal. Avery grew up in Pickering a ­Toronto suburb.

Satsky and Avery both registered through the Global Entry program which allows expedited entry for pre-approved low-risk frequent fliers. Anyone can apply to the program which costs $100 but are subjected to a background check and interview before being enrolled.

The two potential business partners flew back from Toronto to Newark Airport and headed to the Global Entry kiosk at customs. But while Satsky received clearance with no problem ­Avery — who was using the service for the first time — got jammed.

Sources tells us a big “X” appeared on the kiosk screen after the hockey star entered his information. An officer then appeared and asked Avery to step onto the regular customs line and have his passport swiped.