Costa Mesa police detained 43 people early Saturday after being called to an unoccupied commercial building by a security guard who reported an unauthorized rave taking place.

The partygoers, who numbered about 200, were inside a building in the 3300 block of Harbor Boulevard that had been broken into, said Costa Mesa police Sgt. Jim Brown.

The illegal gathering was reported at 12:19 a.m.

Among those detained, Kevin Mayorga, 20, of Anaheim was arrested for resisting officers, carrying a concealed and loaded gun, and trespassing, Brown said.

Police also booked 10 people on suspicion of trespassing and issued misdemeanor citations to 32 others, Brown said.

Many others fled the area near South Coast Drive and Harbor, which has been the site of other unauthorized parties, according to Brown.