David Sweat, one of two New York state inmates who escaped from prison three weeks ago, was shot by police near the Canadian border and rushed to a local hospital on Sunday, two days after his accomplice was killed, authorities said.His capture was the dramatic climax of a massive manhunt for Sweat and his fellow inmate Richard Matt, who were discovered missing from the Clinton Correctional Facility in Dannemora, New York, on June 6. Some 1,300 members of law enforcement took part in the search through the forests and bogs of northern New York.Sweat, 35, was shot twice and taken into custody in the town of Constable, New York, 23 miles (37 km) north of Duane, where his accomplice was shot and killed on Friday, authorities said. He was captured just a mile and a half (2.4 km) south of New York's border with the Canadian province of Quebec.Sergeant Jay Cook of the New York State Police was on patrol alone when he spotted "a suspicious man walking down a roadway" at about 3:20 p.m. local time.Cook called out to the individual, and when he turned the officer recognized him as Sweat, police said.The fugitive took off running and the officer shot him twice in the torso, police said. Sweat was taken into custody and transported to a local hospital for treatment."The nightmare is finally over," New York state Governor Andrew Cuomo told a news conference. "If you were writing a movie plot, they would say it was overdone." He added that Sweat was in stable condition.