The suspected Buffalo shooter reportedly saw New York's strict gun laws as an advantage in the recent attack that left 10 people dead.

According to the Buffalo News, law enforcement officials said that they believe an online manifesto was written by the suspected shooter, identified as 18-year-old Payton Gendron. In the manifesto, Gendron allegedly wrote about how he planned to "kill as many Blacks as possible" in the attack and decided to carry it out in New York due to its strict open carry gun laws, which would make it harder for someone to stop him, the Buffalo News reported.

The Giffords Law Center states that New York State residents are prohibited from openly carrying a loaded handgun outside of their homes without a carry license.

"The state also prohibits any person from possessing a 'loaded' short-barreled shotgun or rifle or an assault weapon outside of his or her home or place of business," the Giffords Law Center said. "New York does not issue licenses to carry handguns openly."

The suspected Buffalo shooter allegedly wrote in a manifesto that New York's strict gun laws would limit the chances of someone stopping the attack. Above, law enforcement officials are seen at the location of the mass shooting incident at a Tops market on May 15, 2022 in Buffalo, New York.Scott Olson/Getty

On Saturday, Gendron allegedly traveled to a Tops Friendly Markets in Buffalo, New York, and carried out a mass shooting. The incident was first reported on Twitter by the Buffalo Police Department, who wrote that officers were "on scene of a mass shooting at the Tops in the 1200 block of Jefferson Avenue."

"Police say multiple people have been struck by gunfire. The shooter is in custody. Motorists and residents are urged to avoid the area," the Buffalo Police Department said.

According to the Erie County District Attorney's Office, Gendron was allegedly outfitted in tactical gear and used an assault-style weapon to shoot several people both outside and inside the Tops Friendly Market. The incident was also livestreamed on the social media platform Twitch.

"It is further alleged that the defendant entered the store and exchanged gunfire with an armed security guard. The security guard, who was a retired member of the Buffalo Police Department, died from his injuries," the Erie County District Attorney's office said in a statement.

The U.S. Department of Justice said in a statement they believe the mass shooting incident was "a hate crime and an act of racially-motivated violent extremism." According to the Buffalo News, Gendron allegedly spoke about racist views in the manifesto that was posted online prior to the shooting. Gendron also allegedly wrote in the manifesto that he was inspired to carry out the attack out of a fear that white Americans are being replaced by individuals of other races, a conspiracy known as the "Great Replacement Theory" that is mostly pushed online by far-right groups.

According to the Erie County District Attorney's Office, Gendron could face life in prison without parole, if found guilty.

Newsweek reached out the Buffalo Police Department for comment.