Eight persons were killed and seven were injured tonight as a smoky fire of undetermined origin swept through the Haunted Castle attraction at Six Flags Great Adventure Park here, authorities said.

"The fire spread so quickly because of the wind that apparently the victims had no time to escape," police Capt. Samuel DePasquale said.

The dead, burned beyond recognition, were visitors to the 200-acre amusement park and were believed to be teen-agers, Police Commissioner Richard Borys said.

"I don't think we'll be able to identify them by tomorrow," he said. "It's going to be a slow task. We don't know if they were men or women--that's how badly the bodies were burned."

Glenn Vallach, a spokesman for the park, said the search was hampered in part because the haunted house had many mannequins and other life-like figures that could be mistaken for human forms.

DePasquale said, "We don't think there are any more bodies, but we are investigating very carefully . . . . The structure was pretty much destroyed, so we have a lot of rubble . . . . "

The park is located off Exit 7A of the New Jersey Turnpike. Park official Andrea Smeal said that, before the park opened last month, fire inspectors checked every ride and attraction. Had there been violations, the park would not have been permitted to open, she said.

The Haunted Castle, a walk-through amusement, was composed of seven metal trailers joined by walkways.

Fire broke out shortly after 6:30 p.m. and raged out of control until about 8 p.m., according to police. It was confined to the castle, but police and park personnel quickly evacuated thousands of patrons crowding the park for a rock concert.

Park patron Jerry Wolkowitz said he saw flames "leaping 100 feet in the air . . . . Thick black smoke was billowing up."

Great Adventure maintains a firefighting force and equipment, but several area fire companies were called to the scene because the park's water supply was not adequate.

At 8 p.m., the park was closed, two hours earlier than usual, officials said, and patrons were given free return tickets.

Seven persons were treated at Freehold Area Hospital for smoke inhalation and released, a nursing supervisor said.

The amusement park, in its third ownership, has been located in Jackson for nearly a decade. Six Flags took it over in late 1977.

The amusement park and the safari area in which 2,000 animals roam free in a 500-acre preserve attract millions of visitors each year.

In August, 1981, a 20-year-old man fell off a roller coaster known as Rolling Thunder while running a routine test on the ride. The same month, a 19-year-old woman suffered a fatal heart attack on that ride.