(CNN) A handwritten note in a killer's back pocket helped lead to the arrest of a man connected to a gunman in last week's Jersey City mass shooting, authorities said.

Ahmed A-Hady of Keyport, New Jersey, was arrested by FBI agents Saturday. The 35-year-old faces a charge of being a previously convicted felon in possession of a firearm, the US Attorney's Office in New Jersey said.

Investigators say A-Hady's phone number was found on a handwritten note in the back pocket of David N. Anderson, one of two assailants who gunned down a Jersey City police officer and then killed three people at the Jersey City Kosher Supermarket.

After an hourslong shootout with police, Anderson and the other suspect, Francine Graham, were found dead in the store.

The note in Anderson's pocket "contained a telephone number ending in 4115, and a Keyport, New Jersey, address," the US Attorney's Office said.

Read More