A man who police say barricaded himself inside his apartment and fired shots at a SWAT team is in custody after a standoff Saturday in Hingham, Massachusetts.

Pharaoh L. Yahtues, 37, of Hingham, was arrested around 12:45 p.m. following over three hours of negotiations with law enforcement.

This man, Pharaoh Yahtues, was arrested Saturday in Hingham after barricading himself in his apartment and shooting at SWAT Officers. No one was injured. After over three hours of negotiations, the man gave himself up and was arrested without further incident. @nbc10boston @necn pic.twitter.com/HA79P33pRu — Cassy Arsenault (@CassyArsenault) January 26, 2020

Yahtues is facing charges of armed assault to murder, discharging an explosive, discharging a firearm within 500 feet of a building, possession of a firearm without a license, possession of ammunition without an FID card, disturbing the peace, and possession of theft detection removal device.

Hingham police say no one was injured in the incident that started at 6:19 a.m. when they responded to a disturbance inside an apartment at 111 HMS Fitzroy Drive in the Hingham Shipyard. A woman and two children in the lobby told officers they had been in Apartment 304 with a man, later identified as Yahtues, and that he had a handgun.

Police spoke to Yahtues through the apartment door in an attempt to have him come outside, but authorities say Yahtues threatened to shoot officers through the walls, making statements about “suicide by cop.”

Another man then called 911 saying he was inside the third-floor apartment with Yahtues and had locked himself in a bedroom fearing for his life.

Residents of nearby apartments were evacuated, and a SWAT team was called to the scene.

Members of the SWAT team used a Hingham Fire Department ladder truck to reach the third-floor bedroom and brought the man who called 911 out the window to safety.

“It just came out of nowhere," said Hingham resident Jill Fitzgerald. "I was just sitting there having a cup of coffee in my kitchen and I looked out my window, and I’m like, ‘Oh my God!’”

Fitzgerald says she saw dozens of SWAT officers surround the complex with their guns drawn. “I thought, ‘Okay, this is serious stuff.’ And then after about an hour or so, there were a couple shots fired.”

Around 9 a.m., a reverse 911 call and an emergency alert text message were sent out, urging residents in the area to shelter in place and stay away from windows until further notice.

1/2 We have a barricaded subject inside home on HMS Fitzroy Dr. with a gun who fired shots at the SWAT team. No injuries. Immediate residents have already been evacuated. Reverse 9-1-1 telling others in general area to shelter in place away from windows... — Hingham Police (@HinghamPolice) January 25, 2020

In the advisory, police urged residents near Whitaker Lane, Amesbury Drive, Fogg Way, Bickerton Way, Shipyard Drive and USS Stayner Drive to stay indoors. Shipyard Drive was closed to through traffic throughout the ordeal.

Police say Yahtues fired several shots from his apartment window at SWAT officers but that no one was hit by the gunshots.

After shots were fired, Fitzgerald says SWAT officers banged on her door and told her to leave immediately.

“They just said, ‘You have five minutes to get out of the building,’” she recalled.

Police evacuate residents at #Hingham Shipyard as armed suspect remains barricaded inside apartment. Police say he fired on them, but no one hurt. @NBC10Boston @NECN pic.twitter.com/vzfXi4AZMg — Ally Donnelly NBC10 Boston (@AllyNBCBoston) January 25, 2020

Lynn O'Connell, who was at a local hospital until 2 a.m. welcoming her first granddaughter into the world, says she came home for her first night at her Hingham rental home for some sleep and had barely closed her eyes when a SWAT team member told her she had to leave.

"He said, 'you have to get out,' and I looked at him like he was crazy. And he said, 'there’s imminent danger,'" O'Connell said.

"This is a very active scene and we are working to negotiate with subject who is alone in house," police said at the time.

One person who police say fired shots at a SWAT team is in custody after a standoff, and the residents who were evacuated near the Hingham Shipyards have returned home.

Crisis negotiators from the Quincy Police Department were sent to assist the SWAT team, according to police.

Additional people were evacuated from the area after authorities say Yahtues threw an unexploded device onto his patio. No one was injured, according to police.

After more than three hours of negotiations with law enforcement, Yahtues agreed to surrender. Police say he came outside his apartment and was arrested without further incident.

Update-Area is safe. Shelter in place is now over. Investigators remain on scene at the home. Thank you tor your cooperation. Media release to follow. — Hingham Police (@HinghamPolice) January 25, 2020

Residents were allowed back in their homes after the Massachusetts State Police bomb squad searched the suspect's apartment for any additional explosives.

Hingham detectives executing a search warrant inside Yahtues' apartment recovered a semi-automatic handgun hidden in a ceiling vent.

Police say the probation department issued a temporary warrant for Yahtues' arrest during the incident because the GPS tracking device he had been ordered to wear was cut off.

It's unclear what prompted a person to shoot at SWAT team members in Hingham.

“It ended in a peaceful resolution, and that’s the best resolution for everybody. And no one was injured.” Sgt. Steven Dearth said.

Hingham police say they are appreciative of the numerous agencies that responded to assist throughout the ordeal on Saturday.

Officials say the charges against Yahtues are preliminary and that additional charges are possible. Yahtues is being held without bail and will be arraigned Monday at Hingham District Court.