A dog named Wizard has lived up to his name after being pulled from a well he had stumbled into, perhaps weeks earlier.

The 7-year-old mongrel, owned by Teresa and Barry McCrickard of Amherst, Va., had been missing since July 4, when he ran away from noisy fireworks. Never a dog that cottoned to being cooped up in a pen, Wizard had wandered off before. But he always returned the next morning to eat, said Teresa McCrickard, who lives about 165 miles southwest of Washington.

Wizard's owners figured that their dog, a cross between a shepherd and a chow, was too ugly for anyone to adopt, and they feared that he might be dead. But last week, a farmer checking out a six-foot-deep well saw two eyes peering back at him. It was Wizard, emaciated and dehydrated but alive.

"He was a lucky dog, no two ways about it," said Patrick Gries, the veterinarian whose name was on Wizard's rabies tag. "He walked in under his own power, wagging his tail to boot. He was very, very thin. We gave him a can of dog food, and he wolfed it down."

No one knows exactly how long Wizard was in the well. It might have been a week; it might have been six.

But it was long enough to take its toll. Wizard had lost more than 20 pounds and rubbed off the pads from his rear paws trying to climb the well walls, McCrickard said. He also emerged with a case of hookworm, possibly from eating critters down there in the well with him.

He is home now, still using his teeth to pry apart the chain-link fence to escape, although he rarely ventures beyond the front porch.

"This dog lived for a reason," McCrickard said. "Most dogs would have died. Most people would have died. But Wizard wanted to come home."

Wizard had been missing since July 4.