MIAMI -

A man armed with a machete was shot by a security guard after he threatened shoppers at a Little Havana supermarket Wednesday night, police said.

It happened about 9:45 p.m. at the Presidente Supermarket on Southwest Eighth Street.

Miami police said Hector Hechavarria was armed with a machete when he was threatening several patrons at the store.

Police said he whacked a woman with the blade of his machete and an armed security guard tried to intervene, but Hechavarria hit him on the head, so the security guard shot him several times.

Hechavarria was taken to Jackson Memorial Hospital, where he was listed in critical condition. He faces charges of attempted premeditated murder with a deadly weapon.

The security guard, identified as Jose Mendoza, was also hospitalized with minor injuries.