A three-year-old burglary looked to be unsolvable in Blasdell, until police got a hit on a DNA sample taken at the scene.

The burglar took $10 in change and a bottle of whisky from a Blasdell bar, and he left something behind: blood.

Lt. Joseph Gramaglia investigated the March 2009 burglary at Sneakers Bar on Martin Avenue. He said there was a little spot of blood on the cash register.

“The suspect had cut himself breaking in the back window,” he said.

He called in a Hamburg Police Department detective trained in the retrieval of DNA.

“Three years later we got a CODIS hit,” he said, referring to the Combined DNA Index System.

New York State enacted a law last March requiring DNA samples to be taken from those convicted of all crimes, excluding those committed by first-time offenders of marijuana possession. Previously, state law had permitted DNA to be collected from those charged with the most serious crimes, amounting to 48 percent of offenders.

Police arrested Nickolas McNamara, 31, of Buffalo, on charges of burglary, criminal mischief and larceny.

Gramaglia credited the new state law with identifying the blood at the scene as having McNamara’s DNA.

The bar had closed at 4 a.m., and the burglary was discovered at 8:30 a.m. the same day by a worker who came in for the morning shift, Gramaglia said.

“He took $10 in quarters and a bottle of Crown Royal,” Gramaglia said.