How many special agents does it take to escort Benjamin Netanyahu, the prime minister of Israel, to the bathroom? Around 20.

On Tuesday, Bibi, in New York for the UN General Assembly, caused a stir at upscale restaurant Harry Cipriani at the Sherry-Netherland hotel by arriving with an over-40-strong team of buff agents from the elite Israel Security Agency, known as Shin Bet.

Fellow diners, including Charlie Rose, billionaire Ronald Perelman, Barbara Winston, ­DuJour’s Jason Binn and fashion icon Iris Apfel, watched as the agents swarmed the venue.

“A security detail of 20 came an hour before Bibi arrived, then he turned up with around 20 more agents just after 9 p.m., in a restaurant that seats just over 100 people. Other agents were discreetly placed around the restaurant. They had a large security device in a black box,” said the spy.

“Bibi sat with his wife for dinner, but then he went to the bathroom,” the source said. Guests are required to exit the restaurant through a side door into the Sherry-Netherland hotel, and the bathrooms are a few feet away downstairs.

“Around 20 security guards got up with Bibi and a few went into the bathroom with him. One watched the door, and the rest lined up with their arms up to form a human barricade, so nobody could enter the bathroom or even get close,” the source continued.

There was also a massive ring of security positioned around the hotel. “In order to get to the restaurant, you had to walk around the block to a barricaded area, which was manned by security and attack dogs,” said the source, who added, “Guests were patted down and had to go through metal detectors. He must be the most protected man in the world right now.”

It has been reported that Bibi often has up to 500 security guards on a daily basis. He uses dogs to detect explosives and devices designed to disrupt anyone attempting to detonate a remote bomb using a mobile phone signal.

A rep for the restaurant declined to comment on the “Netanya-loo” visit.