After the bathroom antics at the Met Gala — during which stars crammed the loos at the Metropolitan Museum, peeving some patrons — a celeb at the lavish Robin Hood Foundation benefit had the opposite issue.

When Jennifer Lopez — arguably the biggest star at the event — headed in to powder her nose, “four security guards shut down the ladies’ room for her at the Javits Center,” said a witness. “A huge line of ladies — including [society grande dame] Deeda Blair — were waiting for her to come out so they could go in.”

As the line grew, “People were thinking Hillary [Clinton] or another politician must be in there, but Alex Rodriguez, standing off to the side on his phone, waiting, gave it away. Then J.Lo strode out with the guards in tow and the regular people were let in. It was insane!”

A-Rod was co-chair, along with Len Blavatnik and others, of the gala, which raised a jaw-dropping $54.5 million from a deep-pocketed crowd, including Lloyd Blankfein, Henry Kravis, Kenneth Griffin, Jeb Bush, Eli Manning, Michael Douglas and Catherine Zeta-Jones.

A spy said that hot new couple J-Rod needed the security in the crowd of 3,700: “So many people were coming over to them, they had to have it.”

A pal further explained, “It’s really awkward when someone asks for a selfie when you walk out of a toilet stall.”

Either way, “[Gov.] Andrew Cuomo had more security.”

Miley Cyrus performed a new song and Rodriguez introduced Coldplay rocker Chris Martin as J.Lo rocked out at the side of the stage.

Dave Chappelle called the hedge funder-heavy event “the Illuminati bake sale or whatever this thing is.”

Reps for J-Rod didn’t comment.