A Humboldt County sheriff's deputy who was shot in the chest while serving a warrant has been released from a hospital and deputies arrested a suspect early Wednesday, officials said.

The deputy, whose name hasn't been released by sheriff's officials, had been wearing his protective vest and reportedly suffered bruising.

Suspect William Lloyd Nelson, 55, was arrested about 12 hours after Tuesday afternoon's shooting, which occurred at the man's Shelter Cove home, sheriff's officials said in a release.

Nelson was found at about 3:30 a.m., attempting to get back onto his property. He was armed, officials said, but gave up without incident.

Deputies arrested him on suspicion of attempted homicide and using a gun while committing a felony.

The suspect was booked into the Humboldt County Jail in lieu of $2 million bail.

The incident started at about 2:45 p.m. Tuesday when two Humboldt deputies arrived at Nelson's coastal area home north of Leggett to serve him with court papers calling for his eviction.

Nelson shot at the deputies, who returned fire, officials said.

The two law enforcement officers fled the property and called for help, bringing a large law response to the Kelly Road area.

The response included deputies, detectives, Eureka and Arcata police officers and sheriffs' SWAT teams from Humboldt and Mendocino counties.

Residents in the community were contacted by an automated phone call and told to stay inside. Some routes were closed during the effort to arrest the man, who officials believed remained in his home.

Sheriff's officials believed the man remained in his home and set up around the property.

But he'd apparently fled the home after the gunfire and before dawn he was found attempting to get inside his home.