A TSA supervisor at Newark Airport traveled the extra mile to return $5,000 in cash belonging to an absent-minded airline passenger who lost his wallet, agency officials said Tuesday.

The passenger — a resident of Penn Yan in New York’s Finger Lakes region — was flying to the West Coast on Monday when he misplaced his wallet.

There was $5,000 in it and a bunch of credit cards but no ID, officials said.

It was returned by an unidentified TSA security officer to the New Jersey airport’s lost-and-found.

Then Ofella Ruiz, a TSA customer-service manager, called one of the credit-card companies and asked a representative there to reach out to the traveler and have him call the TSA when he landed to let him know his money and cards had been found.

The absent-minded traveler called and confirmed that he lost his wallet, describing in “perfect detail,” what it looked like, authorities said.

He was so thankful that his money was found that he offered a cash reward — one that agency officials declined, as TSA employees can’t accept gratuities.

“I figured he was going to have a heart attack when he reached for his wallet and it wasn’t there. I knew I had to act fast,” Ruiz said, according to a TSA statement.

“He probably took his ID out of his wallet when he came to the checkpoint and didn’t slip it back into his wallet,” she said.

The man also sent the TSA a photo of himself, and the agency said it plans to review security video to confirm that the man in the picture actually is the man who lost his wallet and then ship it to him, along with a money order for the $5,000 cash.