– After more than three weeks of trudging though swamps, forests and residential areas, a prison guard tactical team cheered and laughed on the side of Route 30 in the town of Constable, N.Y., on Sunday.

They could finally go home.

David Sweat, the surviving escapee of the June 6 breakout at Clinton Correctional Facility, was shot but alive.

The officers smiled. One said to another, “I can’t wait to get into dry clothes.”

There were scenes of jubilation as people across the northern Adirondacks celebrated the end of a three-week manhunt that kept loved ones away on the search and doors locked for fear the two missing men might try to get in.

In Dannemora, dozens of people stood near the foreboding prison wall to cheer prison guards and police as they rolled back into town.

“We’re giving thanks that everybody got home safe,” said Roger Favreau, of Morrisonville. “Law enforcement did their job, no matter how long it took them.”

Clinton County Sheriff David Favro said he was glad Sweat didn’t get to Canada.

“You couldn’t have asked for a more perfect ending than to have a hometown guy bring him down,” Favro said of State Police Sgt. Jay Cook, the trooper who shot Sweat.

Driving home, Favro saw people with banners and kids cheering.

“It was really nice to see that the community has been so involved from start to finish,” he said.

Earlier Sunday, there was a feeling of excitement, relief and shock in Constable. Residents were surprised to hear Sweat, 35, was found in their quiet community near the Canadian border. The other escapee, Richard Matt, was shot and killed Friday.

The end of the manhunt thrust Constable, a community of 1,556 people, into the international spotlight.

Danny Terrance, 57, lives near where Sweat was captured.

“I’m feeling great because I have eight kids, 12 grandkids and four great-grandkids,” he said. “We were always on edge. Every time the dog barked it was like, ‘Are they around?’ ”