SOMERSWORTH — The man charged with calling in two bomb threats in May of 2012 pleaded guilty to the two felony charges Wednesday morning in Strafford County Superior Court.

Gary Goss, 48, of 70 Colonial Drive, was arrested by Somersworth Police four days after calls came in on May 8 of 2012 to two separate Somersworth businesses.

Police, firefighters and rescue personnel first responded to and evacuated The Works Health Club and then Wal-Mart after bomb threats were received by phone.

The call to The Works was received at approximately 7 a.m. and the caller stated an explosive device would ignite within 11 minutes. The second threat was received about 45 minutes later at Wal-Mart, but was less specific.

After conducting an investigation, speaking with employees and checking phone records at both businesses, police found Goss’ phone number to match both incidents.

In court on Wednesday morning, the state’s attorney said at the time of his arrest Goss was “having a tough time with his mother dying.” The attorney said Goss immediately dropped his head and admitted he had done it.

The attorney said Goss threatened those two businesses in particular because Goss’ wife was working at Wal-Mart and he wanted her to be able to come home early. At The Works, which is in proximity to Goss’ home, some work had woken him up at 3:30 a.m.

Goss’ attorney said Wednesday his client has disabilities and is now on prescription medications that are “having the desired effects.”

The judge said he hopes that is the case and told Goss what he did was “kind of stupid.”

Goss said, “I agree.”

The judge accepted Goss’ plea of guilty to the two felonies, which will each impose six months of jail time to be suspended upon good behavior in addition to two years of probation and community service.

Goss was also ordered to pay $3,204 in restitution to Wal-Mart for loss of sales during the evacuation.

Goss’ lawyer said, “There is a standard calculation of profit margin used for retail sales … We think it’s fair.”