The 22-hour manhunt for the surviving Boston bombing suspect reached a dramatic and surprising conclusion on Friday night when 19-year-old Dzhokhar Tsarnaev was captured alive after being surrounded by heavily armed police in a suburban backyard.

Tsarnaev was found hiding in a boat in the yard of a home in Watertown, Massachusetts, the small town near Boston where his elder brother Tamerlan was fatally shot by police after a chase that began the prevous evening. The pair had been identified as suspects in Monday's double bomb attack on the Boston Marathon that killed three people and injured more than 170.

For about two hours on Friday night, Tsarnaev was surrounded by Swat teams and hundreds of other officers, surviving a barrage of gunfire and flash grenades. At 8.41pm ET, it was finally announced over the police radio: "Suspect in custody".

Corbis

Tsarnaev, pictured, had been injured in a shootout with police on Thursday and had suffered significant blood loss. Police said he was in a serious condition in hospital on Friday night.

When the news came through that Tsarnaev captured alive, Thomas Menino, the mayor of Boston who has struggled through the week with his own health issues, reacted by saying: "We got him." A large crowd gathered near the location of the suspect's arrest began clapping and shouting "Thank you" as a police ambulance carrying the suspect drove by.

At a jubilant press conference after the arrest, the sense of relief among law enforcement officials was palpable.

Massachusetts police superintendent, Colonel Tim Alben, said: "We are so grateful to bring justice and closure to this case. We are grateful for the outcome here tonight. We're exhausted, folks, but we have a victory here tonight."

Explaining the breakthrough that had led to Tsarnaev's capture, Edward Deveau, the Watertown police chief, praised local residents. "It was a call from a resident of Watertown," he said. "We asked you to remain vigilant and you did. We got the call and we got the guy."

Shortly before the the arrest, police in New Bedford, Massachusetts, confirmed that the FBI had taken three people into custody for questioning at a housing complex where Tsarnaev, a student at the University of Massachusetts at Dartmouth, may have lived.

In a statement at the White House, President Obama said: "Tonight our nation is in debt to the people of Boston and the people of Massachusetts. All in all, it's been a tough week, but we've seen the character of our country once more."

But he said there were many unanswered questions, particularly with the news that both men had lived in the US for some time. "Why did young men who grew up and studied here as part of our communities and our country resort to this violence?"

There are also likely to be questions about the role of the FBI. The Tsarnaevs' mother, Zubeidat Tsarnaeva, told Russia Today that the FBI had been in contact with Tamarlan Tsarnaev for between three and five years.

The FBI admitted looking into the activities of the older brother in 2011 following a request by a foreign government, thought likely to be have been Russia.

Agents checked Tamerlan Tsarnaev's name against their databases along with his education, travel history and possible associations with other persons of interest.

"The FBI did not find any terrorism activity, domestic or foreign, and those results were provided to the foreign government in the summer of 2011," the FBI said in a statement on Friday.

Dzhokhar Tsarnaev's apprehension brings to an end five days of high anxiety that began at 2.50pm on Monday, with the blasts, 12 seconds apart, near the finish line of the Boston marathon. The FBI say the brothers had dropped bags containing bombs made from pressure cookers packed with nails and ball bearings.

SWAT teams enter a suburban neighborhood to search for the remaining suspect in the Boston Marathon bombings in Watertown Photograph: Jessica Rinaldi/Reuters

A breakthrough in the case came on Thursday evening when police identified two suspects and published their photorgraphs. The drama unfolded quickly: at about 10.30pm on Thursday the two brothers, of Chechen origin, ambushed a police officer, Sean Collier, 26, on the campus of MIT. They then carjacked a black Mercedes, sparking a car chase with police that ended with a huge gunfight in Watertown.

Pipe bombs and other explosive devices were thrown by the suspects. Tamerlan Tsarnaev, 26, was killed, but Dzhokhar Tsarnaev escaped on foot.

More than a million residents of Boston and the surrounding towns had been told to stay inside their homes for most of Friday as hundreds of law enforcement officers went door to door in Watertown searching for Tsarnaev.

The final flurry of frenzied police activity began shortly before 7pm on Friday, just minutes after police chiefs had come before the TV cameras and told the residents of Watertown that they were ending the lockdown, despite admitting that they had lost track of the suspect.

A renewed bout of gunfire of about 30 rounds ripped through Watertown as Swat teams and dozens of police vehicles raced to the area of Birch Road, a leafy street with about 14 houses in it. Police immediately ordered people in Watertown to stay indoors, while officers evacuated nearby households, helping families flee across an adjacent field.

A resident of Watertown had called police to report he had found a man covered in blood hiding in the boat standing in the yard of a house in Birch Road. Officers exchanged gunfire with the Tsarnaev as they surrounded the boat. There was no chance this time that he could escape.

It is now believed that Tsarnaev may have been holed up in the boat all day, eluding the door-to-door search that was going on elsewhere. Birch Road is just a couple of blocks outside the 20-block exclusion zone that the police had set up early on Friday in an attempt to contain the suspect.

Amid fears that Tsarnaev may have been wearing a suicide vest or carrying explosives, officers were extremely cautious about moving in. As darkness fell, the barrage of forces ringed around the boat was reinforced by specialist FBI squads dressed in full military gear, wearing protective helmets and vests and equipped with nightvision goggles. Bomb disposal experts, equipped with a robot, were also brought in.

Police used a helicopter to monitor the boat from overhead, reporting early in the operation that there was visible movement coming from underneath the tarp, suggesting that Tsarnaev was at that point still alive. Minutes before 8pm there were flashes of light and booms thought to be grenades thrown into the boat.

Around 150 people had gathered at the end of nearby Franklin Street to watch the police operation. Most were neighbours who lived within one or two blocks. Many had waited here for an hour or more after hearing police had the second suspect cornered.

An ambulance carries Boston marathon bombing suspect Dzhokhar Tsarnaev from the scene after he was apprehended in Watertown, Massachusetts Photograph: CJ GUNTHER/EPA

The first sign that Tsarnaev might have been taken into custody came when a uniformed officer walked away from the top of Franklin Street and vigorously clapped the hand of a fellow official. He looked down at the ground and clapped his hands two or three times.

The crowd read the signal and broke out into applause, cheering. "Did you get him?" one man shouted. An officer nodded his head. The cheers intensified.

"It feels great," said Bill Forbush, who two blocks away from where Tsarnaev was apprehended. He and his wife, Ann, had been standing on the corner for an hour and a half. They had heard the first gunshots, and heard the sounds of what reportedly were flash bang grenades. They had spent 20 hours indoors while the town was locked down.

"It's nice to be out in the spring air and be relieved," Bill Forbush said. "There's a great sense of relief."

As he spoke police vehicles and officers began to stream out of Franklin Street. Each vehicle and each official was cheered. "Great job, you guys," shouted one man, over and over.

Tsarnaev had proved to be exceptionally adept in eluding the combined forces of some of the most highly trained and heavily armed law enforcement agencies in America. By the time of his capture, he had managed to evade capture for more than four days.

'A guy with full potential'

More details emerged on Friday about the background of the brothers, ethnic Chechens who had followed a convoluted path to the United States. Although it appears that they never lived in Chechnya, they maintained close ties to its culture.

There were conflicting reports about their places of birth. Local media in Kyrgyzstan quoted police saying they had both been born there. But family members in the US said the younger brother, Dzhokhar, was born in Dagestan. The brothers are thought to have spent some of their youth in the city of Tomok, the centre of Kyrgyzstan's Chechen community.

According to his page on the Russian social network VKontakte, Dzhokhar Tsarnaev attended School Number One in Makhachkala, Dagestan's capital. Irina Bandurina, an administrator at the school, said Dzhokhar Tsarnaev studied there in 2001, after moving from Kyrgyzstan, and left for the United States in 2002. He appears to have spent his formative years in the US and graduated from high school in Cambridge, Massachusetts in 2011. The first of two wars in Chechnya broke out in 1994, a year after he was born. The battles with Moscow spawned Islamic radicalism in the state, leading to deadly attacks on the Moscow metro in 2004 and 2010, and a school in Beslan in 2004.

Checnya's separatist cause struck Tamerlan Tsarnaev deeply, according to a report by photographer Johannes Hirn, who profiled the young Chechen when he was training for a boxing match in 2010. One caption in the report, which had been removed from Hirn's website by Friday night, read: "Unless his native Chechnya becomes independent, Tamerlan says he would rather compete for the United States than for Russia."

The photo essay also showed him to have been committed to his Muslim faith, and poorly integrated in the US. According to Hirn's report, the Chechen once said: "I don't have a single American friend, I don't understand them."

Friends of Dzhokhar Tsaranaev described him as very differnet from his older brother. Zolan Kanno-Youngs, an intern at the Boston Globe, told the paper in a video report that they were good friends at Cambridge Rindge Latin high school with Dzokhar.

He said: "Dzhokhar was just a guy with full potential, and never showed any signs of doing this whatsoever. I think that if you ask anybody in Cambridge that truly knew him, and truly hung out with him, this you would know that this is probably the most shocking news we've heard in a while ... I can't even comprehend it still."