Police are investigating whether the killing of a Brooklyn man — who told cops “f—k you, son!” as he lay dying — is connected to a shooting last week at a house party, law enforcement sources told The Post.

Investigators believe Arsenio Gravesande — who was shot and killed on a Brownsville street corner Tuesday night — got into a fight at a house party in the neighborhood on Saturday, sources said.

A gunman opened fire at the party, missing Gravesande but hitting two of his friends.

Gravesande allegedly chased after the shooter but didn’t catch up to him, law enforcement sources said.

On Tuesday, a gunman blasted Gravesande once in the left hip at about 9:20 p.m. at Union Street and Sutter Avenue.

Gravesande — an alleged Crips gangbanger — told cops “F–k you, son!” with one of his last breaths, law enforcement sources told The Post.

Medics didn’t initially believe his injury was life-threatening, and cops planned to speak with him once he was treated at the hospital.

He was later declared dead at Brookdale University Hospital Medical Center.