A suspected robber was shot and killed at a Texas motel early Tuesday after grabbing a police officer’s baton and beating him with it, authorities said.

Crederick Joseph, 37, of Opelousas, La., was shot dead just after midnight at the Merit Inn and Suites in Beaumont, located 90 miles east of Houston.

Officers were dispatched to the motel after receiving reports of a trespasser, according to a Beaumont Police Department statement.

While en route, officers were told the suspect assaulted a clerk and was attempting to rob the motel.