Drills whined and workers scrambled to spackle tile and install exit signs. A network TV crew shot footage of chefs stirring the veal and oyster dressing. The first would-be diners had already taken their places in line on Columbus Avenue. And amid the madness, celebrated New Orleans chef Paul Prudhomme talked to Mayor Ed Koch on the phone crusading to bring genuine chicken gumbo to New York despite the best efforts of the city's Department of Health.

It looked as though K-Paul's Louisiana Kitchen, transplanted from New Orleans for five weeks, and, with typical New York hospitality, ordered closed by health inspectors Tuesday on opening night, would be serving shrimp re'moulade and blackened redfish on schedule.

"The man's been incredible," Prudhomme, propped on a stool, his signature golden chili pepper pinned to his white hat, said of Koch. The mayor and two city commissioners, the deputy mayor and a special assistant, all trailed by 30 reporters, had come by this morning to tour the rented space, expedite reinspections, and prevent further damage to the city's image as the Big Crab Apple.

"He knew that restaurants don't get closed down for the violations we had, that's why he's helping," Prudhomme said. "Someone reacted too strongly. Overzealously -- those were his words."

"Normal procedures should be used whether you're a famous chef or if you're not so famous," Koch had said earlier, explaining that restaurants are given 30 days to correct violations.

Among those who had sought Koch's intervention was Ernest Morial, mayor of New Orleans.

Prudhomme, riding the crest of a growing national mania for creole cooking and the fame generated by his bestselling cookbook, arrived in New York last weekend with his entire 48-person staff, his pots and pans, cases of file' powder and red beans, and three off-duty New Orleans cops to keep order.

"You should have seen this place Saturday," said detective Art Bancroft, who legally moonlights as part of K-Paul's security detail. "It was a shell. Unpainted. No lights or air conditioning."

By feverishly working around the clock, however, Prudhomme and company were ready for Monday night's private opening bash complete with jazz clarinetist Pete Fountain and Cajun martinis spiked with hot peppers. One of the guests, however, was an anonymous and viperous city official who, he later told The New York Times, noticed and reported several building code violations. Tuesday, as the crowds queued outside, health department inspectors came, found 29 code violations (the kitchen lacked a no-smoking sign, the bathrooms lacked soap, there was no public explanation of how to perform the Heimlich maneuver) and posted a closing notice on K-Paul's door.

"I knew there was some tentative stuff -- like a few tiles fell off the wall -- but we thought we were in good enough shape to open," Prudhomme said today.

He said the staff sent Tuesday's lined-up patrons home, that the line re-formed and was dispersed again, but then re-formed a third time.

"That's when we decided we wouldn't send them away again," said Prudhomme, who gallantly risked arrest by announcing to the cheering crowd that K-Paul's would serve dinner despite the violations. "People had gone out of their way to come. It would have been wrong not to open."

Indeed, Marty Blaker and George Coleman, who'd driven five hours from Portsmouth, N.H., and had taken positions at the head of the line at 11:30 a.m., were salivating for blackened prime rib ($32) and blackened redfish (also $32). Coleman, an Air Force master sergeant on leave, wore a T-shirt that attested to his having survived a similar ordeal when Prudhomme took his show on the road to San Francisco in 1983. "We were in line 7 1/2 hours that time," Coleman said. "This time we wanted to get here early." Seating began promptly at 6 and K-Paul's, here as in New Orleans, takes no reservations.

Zac Jackson, who'd arrived at 3 p.m., was holding a place in line for his bosses at a market research firm. Personally unimpressed by the coming of K-Paul's, Jackson figured he could at least go home and watch himself on the evening news.

Behind him was Martha Makarowski, a chef at an exclusive East Side club on a spy mission. "I taste recipes and I copy them and serve them," she said.

The New York K-Paul's is a funky storefront with Jackson Pollock-style, paint-splattered floors and red folding chairs. On the walls, along with the same old photos of shrimpers and bayous displayed in the New Orleans restaurant are T-shirts announcing K-Paul's summer tour as if Prudhomme were a rock star. There are similarities: diners here will wait in line for two to four hours and spend an average $50 apiece for food that would cost $30 in New Orleans, just to eat the master's BBQ shrimp.

"You've got to understand that Paul Prudhomme is a national hero," said restaurateur Melvyn Master, who with his partner owns the trendy East Side eatery Jams and had rented Prudhomme the small space at 77th Street and Columbus Avenue. As the repair went down to the wire and the anxious staff awaited the final reinspection tonight that made K-Paul's a legally functioning restaurant, someone came in with a bulletin from the street. "Your folk hero's getting a ticket," he said.

Prudhomme's limo, idling illegally on Columbus Avenue, was receiving -- still another gesture of welcome from the city -- a $15 summons. "It's not because of who he is or isn't," said the cop writing the ticket. "It's my job."