Hikers make their way up a dirt trail to Montara Mountain Thursday May 5, 2011, in background, part of the Rancho Corral de Tierra to be transferred. The 4,262 acre Rancho Corral de Tierra, the largest undeveloped tract of land remaining on the San Mateo coast, is about to be added to the Golden Gate National Recreation Area.

Photo: Brant Ward, The Chronicle

Hikers make their way up a dirt trail to Montara Mountain Thursday...

Image 2 of 3

The view from Rocky Roost at Rancho Corral de Tierra takes in coastal foothills and valleys above Moss Beach and beyond to P illar Point Harbor and the Pacific Ocean.

Photo: Tom Stienstra, The Chronicle

The view from Rocky Roost at Rancho Corral de Tierra takes in...

Image 3 of 3

Local residents Kathy (right) and Michael Rain look back at the Montara Mountains and the Rancho Corral de Tierra they love to hike. The 4,262 acre Rancho Corral de Tierra, the largest undeveloped tract of land remaining on the San Mateo coast, is about to be added to the Golden Gate National Recreation Area.

A Montara man walking two lapdogs off leash was hit with an electric-shock gun by a National Park Service ranger after allegedly giving a false name and trying to walk away, authorities said Monday.

The park ranger encountered Gary Hesterberg with his two small dogs Sunday afternoon at Rancho Corral de Tierra, which was recently incorporated into the Golden Gate National Recreation Area, said Howard Levitt, a spokesman for the park service.

Hesterberg, who said he didn't have identification with him, allegedly gave the ranger a false name, Levitt said.

The ranger, who wasn't identified, asked Hesterberg to remain at the scene, Levitt said. He tried several times to leave, and finally the ranger "pursued him a little bit and she did deploy her" electric-shock weapon, Levitt said. "That did stop him."

San Mateo County sheriff's deputies and paramedics then arrived and Hesterberg gave his real name, the park spokesman said.

Hesterberg, whose age was not available, was arrested on suspicion of failing to obey a lawful order, having dogs off-leash and knowingly providing false information, Levitt said.

He was then released. He did not return a phone call seeking comment.

Witnesses said the use of a stun gun and the arrest seemed excessive for someone walking two small dogs off leash.

"It was really scary," said Michelle Babcock, who said she had seen the incident as she and her husband were walking their two border collies. "I just felt so bad for him."

Babcock said Hesterberg had repeatedly asked the ranger why he was being detained. She didn't answer him, Babcock said.

"He just tried to walk away. She never gave him a reason," Babcock said.

The ranger shot Hesterberg in the back with her shock weapon as he walked off, Babcock said.

"We were like in disbelief," she said. "It didn't make any sense."

Rancho Corral de Tierra has long been an off-leash walking spot for local dog owners. In December, the area became part of the national park system, which requires that all dogs be on a leash, Levitt said.