A Brooklyn waiter was arrested for stealing from the rich and giving to the poor — after he allegedly handed out $3,000 in free drinks to customers at an IHOP restaurant in what he claims was a purely altruistic act.

“I am the modern-day Robin Hood,” William Powell, 27, told cops after he was busted for giving away free beverages at the Downtown Brooklyn IHOP where he worked.

“I am not stealing, I am serving the ones in need. I take from the rich and give to the poor.”

Powell allegedly failed to charge customers for their beverages for six months. A law enforcement source said he was trying to “get bigger tips” from happy customers. But Powell said he wanted to help his fellow New Yorkers.

‘I am not stealing, I am serving the ones in need. I take from the rich and give to the poor.’ - IHOP waiter William Powell

“I was just trying to be generous,” he told The Post. “You’d be surprised how many people are on a really tight budget in Brooklyn.”

Powell said he would hand out a free juice or soda to someone he thought couldn’t afford it — but the tab somehow shot into the thousands.

“It was just me doing my part to do what I thought was in my power to help people. Some people couldn’t afford to have that glass of juice or soda,” he said. “It just piled up to about $3,000.”

The jig was up when Powell’s boss found out and was not amused by his literary reference.

Powell was charged with grand larceny and released without bail. He is due back in court on May 11.