The man suspected of carrying out two mass shootings in Lewiston, Maine, that killed 18 people and wounded 13 others was found dead, law enforcement officials said on Friday.
The news ended a search that began on Wednesday evening and spanned as far as Canada.
Robert Card, 40, a marksman and a member of the US Army Reserves, is suspected to have been behind the two shootings at a bar and a bowling alley.
Senator Angus King told the Bangor Daily News local newspaper that Mr Card was found dead in the clothes he was seen wearing on the day of the shootings.
State Public Safety Commissioner Mike Sauschuck earlier on Friday named all 18 victims and survivors and said that all the families have been notified. A moment of silence followed the reading of the names.
A lockdown order for residents that had been in place since Wednesday was lifted at noon on Friday.
The end of the search brought relief to mill town of Lewiston, where streets had been largely deserted, and bars and shops closed as police looked for him.
The nearby communities of Lisbon, Auburn and Lisbon Falls had also been included in the lockdown. Heavily armed police officers met passengers at the train station in Wells, about an hour's drive from where Mr Card is suspected to have begun the shooting spree.
The Canada Border Services Agency issued an “armed and dangerous” alert to its officers stationed along the US border, warning them to be on the lookout for Mr Card.
He had abandoned his Subaru at a boat launch on the Androscoggin River in Lisbon, about 11km south-east of Lewiston. He also threw away his phone. Divers looked in the river as part of the search.
On Thursday night, police entered a house in Bowdoin, a university town surrounded by farmland about a 20-minute drive from Lewiston.
The scene was played out on national television but after several hours, police determined he was not inside.
The bloodshed rattled towns throughout Androscoggin County, where residents were ordered to “shelter in place” as they joined the growing list of US communities to experience a gun massacre.
Neighbours who know Mr Card and his family were aghast at his alleged rampage.
“This is not the Rob Card we knew,” one told The National. “He wouldn’t hurt a flea.”
Mr Card grew up in the area and was considered a “good kid”, the neighbour said.
The number of people killed in Wednesday's attacks is close to the annual number of homicides that normally occur in Maine, a quiet north-eastern state bordering Canada, which has fluctuated between 16 and 29 since 2012, according to Maine State Police.
As authorities searched for Mr Card, details about his recent behaviour emerged. He underwent a mental health evaluation in mid-July after he began acting erratically while with his reserve regiment, a US official told the Associated Press.
Despite this, Mr Card's guns were never confiscated.
John Collins, who lives close to Mr Card’s home, remembered hearing the sound of gunfire from his back porch as he practised with his guns.
“At times, he would fire for 20 to 30 minutes at a time,” Mr Collins told The National.
Opponents of restrictions on gun ownership have maintained that the issue is one of mental health.
But events in Maine have demonstrated that relying on mental health care is at best is only a partial solution.
This week's shootings have brought into focus the lapsed ban on the possession of assault weapons. The 1994 ban ended in 2004, leading to a sharp increase in deadly shootings using AR-15-type semi-automatic assault rifles.
Significantly, Jared Golden, the Democratic congressman who represents Lewiston, has now reversed this position, and supports the reimposition of the ban, having previously opposed it.
It was all too easy for Mr Card, despite all the red flags, to get an AR-15 rifle.
The massacre has also brought Maine’s own gun laws into sharp focus. There are no red flag laws, nor comprehensive background checks.
Angus King, the independent senator for Maine, observed the state had among the most lenient legislation in the US but also one of the lowest levels of gun crime – until Wednesday.