He critically wounded one officer and, despite being shot himself, kept firing until the gun emptied or jammed. In a final act of defiance, he threw the pistol at police before he was killed.
The tale of that handgun, a black Ruger P95, Serial Number 317-87693, offers new insights into the Boston tragedy and holds warnings of other potential dangers.
Its journey from a street gang that peddled crack cocaine in Portland, Maine, to the grisly shootout in a Boston suburb tells much about illicit drug and gun trafficking in New England, and perhaps more about Tsarnaev.
Authorities believe Tsarnaev's ties to the illicit drug trade in Maine helped finance his six-month trip to the southern Russian republics of Chechnya and Dagestan in early 2012, where he became radicalized. Drug money, they say, also may have helped him buy components of the bomb that killed three people and injured more than 260 on April 15, 2013.
Portland is home to a trio of violent gangs called the True Somali Bloods, the Little Rascals Gang and a newly formed faction of the Crips Nation, according to the FBI.
Federal and state law enforcement authorities had investigated the rival gangs for years with an operation officially called "Run This Town."
A Los Angeles native first legally purchased the Ruger. He told police he passed it to one of the Portland gang leaders, a man known as Icy. But there the trail goes cold.
Precisely how Tsarnaev got the gun is still unclear. But police say he used it to wound Richard Donohue, a Massachusetts Bay Transportation Authority officer, during the shootout. The weapon also was used to kill Sean Collier, a 27-year-old MIT security officer, in his patrol car earlier that night.
No one has been charged in those shootings. Tsarnaev's younger brother, Dzhokhar, faces 30 federal charges, including using a weapon of mass destruction, for his alleged role in the bombing. Prosecutors have said they will seek the death penalty if he is convicted. His trial is scheduled to begin this fall in Boston.
After the bombing, police found evidence that they said linked Tamerlan Tsarnaev to several brutal drug-related killings. During the night of Sept. 11, 2011, three men had their throats slit in an apartment in Waltham, in Boston's western suburbs.
Police said thousands of dollars' worth of marijuana and cash were sprinkled over the mutilated bodies, suggesting robbery was not the motive. The murders remain unsolved.
They immediately noticed that the eight-digit serial number had been filed down and was all but obliterated, a ploy criminals use to hide a gun's origin.
But after a week of forensic work and lab tests, police technicians managed to "raise" seven of the numbers. They ultimately found and matched the missing digit, which was the 8.
Justice Department records obtained by The Times' Washington Bureau show that an agent for the federal Bureau of Alcohol, Tobacco, Firearms and Explosives in Boston formally requested a trace of the Ruger on April 26, 2013.
He marked the file "URGENT-HIGH PROFILE HOMICIDE."
The trace led to a Cabela's, a popular hunting and fishing outfitter with stores across the country, in Scarborough, Maine, just south of Portland. Records showed the gun was purchased Nov. 27, 2011, as part of a "multiple handgun sale."
The buyer was identified as Danny Sun Jr., a Los Angeles native living in South Portland, a Portland suburb.
Five months earlier, on June 23, 2011, law enforcement authorities had set up a joint Organized Crime Drug Enforcement Task Force to investigate the three Portland drug gangs.