It was a little past 11 on a Sunday night, and Emily Pesti's back yard was quiet except for the gurgling of the pool pump and the racket of the night bugs in her tulip trees.

Her scraggly little dog, Dusty, had just trotted out the sliding glass door and disappeared into the shadows beyond the deck light when she suddenly heard thrashing and yelping in the corner of the yard near the hammock.

She rushed into the gloom, where, writhing at her feet on a summer night in Gaithersburg, was a scene right out of the jungle: Dusty struggling in the coils of a huge, predatory snake.

This was not a normal occurrence in Montgomery County.

Pesti, 49, a speech and language therapist with the Montgomery County school district, screamed for her husband. And what followed was a terrifying 15-minute battle pitting the suburban family and their neighbors against a giant reptile bent on eating their dog.

At one point in the July 18 nightmare, Pesti's daughter, Kyle, 18, tried to pull the 12-foot-long snake off the dog with her bare hands, and then flailed at it with a leash.

Pesti's husband, Jaak, 58, a cellular phone salesman, attacked the snake with a surfboard and a shovel as it lunged at him, still gripping the dog.

Finally, under Jaak Pesti's assault, the snake released the dog, which was limp and not breathing. He later revived on the kitchen floor, and the family rushed him to a Rockville veterinary hospital.

The snake, which was described as either a boa constrictor or a Burmese python, was beaten senseless in the back yard and then dispatched by a neighbor who showed up with a .22 rifle. The county's division of animal control said it probably had been someone's pet.

The incident left the Pestis and others on the pleasant cul-de-sac of Mourning Dove Court shaken and angry that they got only scant help from county animal control authorities.

"That snake could kill you," Jaak Pesti said.

Yesterday, the Pestis stood in their back yard and recounted the incident. The 20-pound Dusty, a mixed terrier with bushy eyebrows and curly tail, watched nervously, his blond hair still shaved in spots where he was treated at the hospital.

Emily Pesti said she and her husband had first seen the snake July 16 hiding inside a wooden box that covers the pool-pumping machinery on their deck.

"I knew it was a snake, and I knew it was a huge snake," Emily Pesti said.

The couple said they called the humane society, which retrieves unwanted animals for the county, and were told that workers could come only if the snake was contained.

"I'm going, 'I don't know how to contain a snake that's 10 feet long,' " Emily Pesti said.

She said she was confused and "was left with the impression that I was on my own unless I could contain it." Meanwhile, the snake had slithered under her deck and disappeared. She hoped it was gone for good. Two days later, Dusty discovered that it was not.

As soon as the dog began yelping, Pesti said she knew it was the snake. "I just knew it. . . . I started to scream, 'Help me! Help me!' "

Inside the house, daughter Kyle heard her screaming "like I had never heard her scream." She ran out and saw that the snake had so entwined itself around Dusty that all she could see was his face. She grabbed at the snake and pulled, but it was thick muscle and didn't budge.

Jaak Pesti then raced into the yard. He first attacked the snake with a surfboard from the pool, then grabbed a shovel and laid into the creature, striking it 10, 20, 30 times. It went for him, but he kept it up.

Finally, the snake let Dusty go. The dog was limp, bleeding and not breathing. Kyle was hysterical. "My dog's dead!" she yelled as Dusty lay on the kitchen floor. But then he began to stir. Her mother called a vet.

Outside, Jaak was still pounding at the snake. You could hear it out on the street. "Bam, bam, bam," Emily said. "It was awful."