The assault rifle used in the Newtown massacre was bought at the same shop that sold a weapon to Connecticut’s last mass murderer, it was revealed yesterday.

Omar Thornton bought Glock and Walther handguns at Riverview Gun Sales in East Windsor before fatally shooting eight people in 2010 at the beer distributor that fired him.

Nancy Lanza went to that store to buy the .223-caliber Bushmaster assault rifle used on Dec. 14 by her son Adam to kill 20 children and six educators at Sandy Hook Elementary School, according to the Hartford Courant.

“He was a customer there,” a source told The Post of Thornton, who opened fire at Hartford Distributors in Manchester, Conn., after he was canned for stealing beer.

“He did buy some guns there. He had multiple guns registered to him.”

Thornton also purchased weapons at Hoffman’s Gun Center in Newington, the source said.