US President Joe Biden commented on the mass shooting during a ceremony for police officers killed in the line of duty on Sunday.

"We must work together to meet the hatred that continues to be a disgrace to the soul of America," he told AFP.

Known by the police

The shooter was wearing a helmet, body protection and camouflage clothing as he, armed with a rifle, parked outside the grocery store in Buffalo, New York, on Saturday afternoon.

It shows parts of the perpetrator's live broadcast on the gaming platform Twitch, which several American media have read.

As soon as he got out of the car, he started firing.

Four people were hit by bullets in the parking lot, three of whom were killed, reports CNN.

The massacre then continued inside the grocery store.

A total of 13 people were shot.

Ten of them died.

Saturday's mass shooting was not the police's first contact with the 18-year-old.

He appeared on the police radar in June last year when he threatened to commit an act at his school in his hometown of Conklin around graduation day, the police tell AP.

The teenager, then 17 years old, was detained and taken to a psychiatric hospital for evaluation.

Investigated as a hate crime

Why the perpetrator traveled the 32 miles from his home in Conklin to murder people in a grocery store in Buffalo is not clear.

But the US State Department and the FBI are investigating the act as a hate crime and a case of racially motivated violent extremism.

The store is located in an area where many black people live and eleven of the victims were black, writes AP.

Police are also investigating information that the shooter posted a manifesto online.

In the document, which several media have reviewed, the man describes a worldview characterized by xenophobia, white power and anti-Semitism.

There are, for example, people exchange theories and a tribute reference to the man who murdered 51 people in two mosques in Christchurch in New Zealand in 2019.