An unhinged trespasser broke into the empty Queens, campaign offices of Rep. Alexandria Ocasio-Cortez on Saturday, and barricaded himself into a closet before cops hauled him out.

The man, whose name was not released by police, was emotionally disturbed, police said.

He busted into AOC’s offices at 74-09 37th Ave. in Jackson Heights sometime before 5 p.m., police said.

When cops arrived, he sprayed them with a fire extinguisher and fled into a utility closet, police said.

Once they got him out, cops took him to Elmhurst Hospital for psychiatric evaluation.

AOC was in Washington on Saturday.