An off-duty NYPD officer was stabbed in the shoulder in Queens on Saturday night — during a fight that erupted after a child’s birthday party, law enforcement sources and neighbors told The Post.

The attack happened at 9:30 p.m. on 94th Street near 31st Avenue in East Elmhurst, witnesses and officials said.

The officer — knifed in the left shoulder — was taken to New York Presbyterian Hospital in Flushing.

He was expected to survive.

A suspect was arrested at the scene; police did not immediately release his name or reveal what sparked the birthday-party melee.

Kids had been at the home all day for a little girl’s birthday party, neighbors said.

“There was a party; it started at about 1:30p.m.,” one neighbor said.

“It looked like a good party,” the neighbor said.

“I was dying to go.”

But then hours later, violence broke out.

“I started hearing screaming and shouts,” the neighbor said. “I thought someone was going crazy.”

Click for more from the New York Post.