(CNN) -- The suspect in the Boston Marathon bombings was taken into custody Friday night, bringing to an end a massive manhunt that virtually shut down the Massachusetts capital amid warnings the man was possibly armed with explosives.
Law enforcement officials confirmed the man in custody is 19-year-old Dzhokar Tsarnaev, who escaped a shootout with police in suburban Watertown that left his older brother Tamerlan Tsarnaev -- the other man wanted in the bombings -- dead.
The younger Tsarnaev was in need of undisclosed medical care, the officials said.
After announcing on Twitter the suspect was in custody, Boston police tweeted the following:
The arrest came less than a week after two bombs exploded near the finish line of the Boston Marathon, shocking the nation and leaving a city on edge.
Tsarnaev was cornered late Friday on a boat in a yard of Watertown, a suburb of Boston.
Authorities "engaged" the man, according to one of the officials who spoke on condition of anonymity, just minutes after authorities indicated a manhunt for the suspect appeared to come up empty.
A CNN crew near the scene heard about two dozen gunshots fired, but it was not clear if the shots were fired by the suspect, authorities or both. A number of small explosions, believed to be stun grenades, also were heard.
Authorities, using a bullhorn, called on the suspect to surrender: "Come out with your hands up.
The development came after authorities cast a wide net for the suspect that virtually shut down the Massachusetts capital amid warnings the man was possibly armed with explosives.
Bob Sakowitch was among a number of people who fled as shots were fired.
"It was unbelievable the amount of gunshots. I was scared. I was across the street. We all ran for cover," he said. "... I wouldn't ever want to see this again. It was bad."
More than 22 hours after the search focused on the younger brother, police officers in full body armor, carrying automatic weapons wrapped up their door-to-door search of the area, Col. Timothy Alben of the Massachusetts State Police said.
Gov. Deval Patrick, meanwhile, lifted an order that confined an estimated one million residents to their homes, urging people to "remain vigilant."
The violence and subsequent manhunt began late Thursday just hours after the FBI released photos of the two suspects in the marathon bombings.
"Investigators are recovering a significant amount of homemade explosives" from the scene of the shootout, Massachusetts State Police spokesman David Procopio told CNN.
It was not immediately clear what explosives were recovered, but the discovery followed a tense night in which authorities say the brothers allegedly hurled explosives at pursuers after killing an officer and hijacking a car.
Tamerlan Tsarnaev was wearing explosives and a triggering device when he died, a source briefed on the investigation told CNN on condition of anonymity.
The search followed a violent night in which authorities say the two men allegedly hurled explosives at pursuers after killing Massachusetts Institute of Technology police Officer Sean Collier and hijacked a car.
With more than 200 rounds of ammunition and a number of explosives thrown during the chase and gunbattle, Patrick said the lockdown was necessary.
The manhunt brought Boston and its surrounds to a near standstill. The Boston Red Sox announced they were postponing Friday night's game against the Kansas City Royals "to support efforts of law enforcement officers." NHL's Boston Bruins also postponed its game against the Pittsburgh Penguins.
The city's subway, bus, Amtrak train and Greyhound and regional Bolt Bus services were shut down. Taxi service across the city also was suspended for a time during the manhunt. Every Boston area school was closed.
Boston's public transit authority sent city buses to Watertown to evacuate residents while bomb experts combed the surroundings for possible explosives.
Initially, authorities said the brothers started their rampage by robbing a convenience store. By late Friday, the Middlesex District Attorney's office backtracked on the allegation, saying an investigation determined that the robbery at a 7-Eleven was unrelated.
In Cambridge, across the Charles River from Boston, MIT officer Collier was shot and killed while he sat in his car, the Suffolk County District Attorney's Office said in a statement.
The two suspects, according to authorities, then hijacked a vehicle at gunpoint in Cambridge, telling the driver that they were the marathon bombers, a law enforcement source told CNN on condition of anonymity.
At some point, apparently at a gas station, that source said, the driver escaped.
Police, who were tracking the vehicle using its built-in GPS system, picked up the chase in Watertown. The pursuit went into a residential neighborhood, with the suspects throwing explosives at police.
A shootout erupted and ultimately one bomber -- later identified as Tamerlan Tsarnaev -- got out of the car. Police shot him, and his brother ran over him as he drove away, according to the source, who spoke on condition of anonymity.
Richard H. Donohue Jr., 33, a three-year veteran of the transit system police force, was shot and wounded in the incident and taken to a hospital, a transit police spokesman said Friday. The officer's condition was not immediately known.
Another 15 police officers were treated for minor injuries sustained during the explosions and shootout, Jennifer Kovalich, a spokeswoman for St. Elizabeth's Medical Center, said.
Police believe the brothers are the same men pictured in images released Thursday by the FBI as suspects in the marathon bombing that killed three people and wounded dozens on Monday.
The men are shown in the images walking together near the marathon finish line.
The first suspect -- apparently Tamerlan Tsarnaev, according to authorities -- appears in the images wearing a dark hat, sunglasses and a backpack. The second suspect, wearing a white cap, is the one who remains at large, police said.
But the mother of the Tsarnaev brothers refused to believe they were involved in the marathon bombings and subsequent shootout.
"It's impossible for them to do such things. I am really telling you that this is a setup," Zubeidat Tsarnaeva told state-run Russia Today from Dagestan.
"My son would never keep it in secret. ...If there is anyone who would know it would be me. He wouldn't hide it. But there was never a word."
The brothers came from the Russian Caucasus region and moved to Kazakhstan at a young age before coming to the United States several years ago.
"My youngest was raised from 8 years in America. My oldest was really properly raised in our house. Nobody talked about terrorism," their mother said.
The suspects' parents recently returned to Dagestan in the Caucasus region after living in the United States for about 10 years because they were "nostalgic," the father, Anzor Tsarnaev, told Russian state-run Zvezda TV.
He accused someone of framing his sons. "I don't know who exactly did it. But someone did."
A federal official told CNN that Dzhokar Tsarnaev came to the U.S. as a tourist with his family in the early 2000s and later asked for asylum. He became a naturalized U.S. citizen in 2012. Tamerlan Tsarnaev was not a naturalized citizen, said the official, who spoke on condition of anonymity. He came "a few years later" and was lawfully in the United States as a green-card holder.
Tamerlan Tsarnaev had studied at Bunker Hill Community College and wanted to become an engineer, according to those who knew him. He then took a year off to train as a boxer.
'I don't understand them'
The official said that a posting on a social media site in the elder brother's name included the comments: "I don't have a single American friend. I don't understand them."
Dzhokar Tsarnaev attended Cambridge Rindge & Latin, a public high school, said Eric Mercado, who graduated a year behind the suspect. Mercado said Tsarnaev had worked at Harvard University as a lifeguard.
"We hung out; we partied; we were good high school friends," Mercado told CNN.
"We're all, like, in shock. We don't really understand. There were no telltale signs of any kind of malicious behavior from Dzhokar. It's all coming as a shock, really."
Mercado said he lived a block away from the suspect and did not know his older brother.
Dzhokar Tsarnaev is currently registered as a student at University of Massachusetts Dartmouth, which ordered its campus evacuated on Friday. The school is located 65 miles south of Cambridge, just west of New Bedford.
Larry Aaronson, Dzhokar Tsarnaev's neighbor and a former teacher at the high school Tsarnaev attended, called him a "wonderful kid."
"He was so grateful to be here, he was compassionate, he was caring, he was jovial," Aaronson told CNN.