An armed robbery suspect was tear-gassed out of hiding Friday afternoon after a six-hour standoff with police at a North Charleston residence.

The suspect, William Rice, 21, was smoked out of the attic of the home on Spring Creek Road, a suburban dead-end street that residents said was part of a quiet, family-oriented neighborhood.

Rice was being sought for failure to appear at his armed robbery jury trial that was to have begun Feb. 25, the U.S. Marshals Service said.

The armed robbery charge stemmed from an incident in Berkeley County last May, officials said.

The Charleston County Sheriff’s Office, the U.S. Marshals Service, the North Charleston police SWAT team and the Berkeley County Sheriff’s Office were involved in the operation.

The incident began at about 11:30 a.m. when the homeowner confirmed to authorities that Rice was inside. By late afternoon, Rice could be seen in handcuffs being put in a police car as he shouted something to a friend.

Before his arrest, police did not know if Rice was armed, said Charleston County Sheriff’s Office Chief Deputy John Clark.

That factor was why the operation took hours, he said.

“We were concerned about officer safety issues,” Clark said.

Rice’s mother, Denise Rice, could be heard pleading with authorities to be allowed to try to talk her son into surrendering.

“He’s just scared. He’s a 21-year-old child,” she said.

Eventually, she was accompanied to the house by officers.

The incident unfolded when investigators developed information that Rice was hiding out at a residence in the 7000 block of Spring Creek Road.

“It’s known that Mr. Rice didn’t want to be captured and he thought he could hide from law enforcement in the attic of that home,” said Kelvin Washington, U.S. marshal for South Carolina.

Spring Creek Road is near the intersection of Ashley Phosphate and Cross County roads.

Natalie Caula contributed to this report.