In less than a week, the city’s $50 million “crown jewel’’ pool in Brooklyn’s McCarren Park has turned into a mini-war zone, where frightening melees have injured two cops and a lifeguard.

The Greenpoint pool reopened last week with a splashy ribbon-cutting ceremony featuring Mayor Bloomberg speaking of its “illustrious past and bright future.’’

But yesterday, hundreds of frustrated people were forced to stand in lines that stretched around the block as they waited to be searched by members of a force of 30 security officers that included 20 cops.

With temperatures flirting with 90 degrees yesterday, many got hot under the collar and took out their frustrations on the guards.

“I’m gonna come back and smoke your ass,” a teenager ranted at a Parks employee who turned him away from the main gate. “If not me, someone else is!”

The worker claimed that the teenager had been part of a fracas earlier this week.

Rodoldo Torres, 20, one of three men arrested Monday for allegedly punching a cop in the face, was arraigned early today in night court on two counts of assault. Torres, who was still wearing his black and white swim trunks and a tank top, was released without bail.

Councilman Steve Levin (D-Brooklyn), who represents the neighborhood, said he has gotten many complaints. “People are really upset,’’ he said. “They’re saying, ‘This is supposed to be good, wholesome fun for the family. What is going on here?’ ”

McCarren opened in 1936 and almost immediately gained the “crown jewel’’ title. It closed in 1984 because of the city’s budget woes and a history of violence. It reopened in a changed, gentrified neighborhood last Thursday.

Guards yesterday also turned back people who didn’t bring strong locks — after thieves picked the flimsy ones that some swimmers put on their lockers.

Instant entrepreneurs quickly began selling locks to those waiting on line for around $5.

“The city’s had 28 years to get a proper security plan together for this pool, but they clearly failed,” said Geoffrey Croft of NYC Park Advocates.

“I think this is ridiculous,” said Elisa O’Connor, 26, of Greenpoint whose lock did not pass muster. “The rules should be posted outside, we just waited more than an hour on this line — what a mess!”

Lois Masters, 19, was at the pool with her pal Danielle Siannio, 18.

“We didn’t feel like going to the beach, so this is the next best thing,” said Masters. “If had young kids I would never take them here after what happened, but we’re will to take a chance,” she said laughing. “I doubt anyone will be able to get a gun or knife in the way they are checking today.”

Parks brass downplayed the disturbances.

“The few minor incidents have not impacted the vast majority of pool attendees, just as similar incidents at pools across the city don’t stop New Yorkers from enjoying themselves,” Brooklyn Parks Commissioner Kevin Jeffrey said. “NYPD and Parks Enforcement Patrol officers will continue to staff McCarren and the other large pools as they always do.”

Additional reporting by Sally Goldenberg and Gillian Kleiman