BEAUMONT, Texas — The man fatally shot by a Beaumont Police officer early Tuesday morning at a Beaumont motel grabbed the officer’s baton and beat him with it before being shot by the officer.

Crederick Joseph, 37, of Opelousas, Louisiana, was pronounced dead at the scene early Tuesday morning.

The shooting happened just after midnight at the Merit Inn and Suites at 2460 Interstate 10 East just east of 11th Street according to a news release from the Beaumont Police Department.

Police initially received a call from the female clerk about a trespasser and 911 dispatchers kept the line open with her as she dealt with Joseph according to Beaumont Police Chief Jimmy Singletary.

While an officer was on the way to the motel dispatchers could hear Joseph assault the clerk and attempt to rob her according to Singletary.

Dispatchers were able to relay this information to the officer on the way to the motel.

After the first officer arrived he took Joseph into custody but while he was handcuffing him Joseph grabbed his baton off his belt and began to beat him with it Singletary said.

The officer, who suffered severe lacerations to his face, then pulled his duty weapon and shot Joseph Singletary said.

The officer, who has been with the department for 17 months, was taken to the hospital for treatment of his injuries policed said.

The officer is recovering from his injuries at home while on paid leave, which is standard procedure following an officer-involved shooting, according to Singletary.

Joseph was a convicted felon with a long record including evading arrest Singletary told 12News.

Police spent just over six hours on the scene and are continuing to investigate the shooting.

The owner of the hotel told 12News that this was an isolated incident and that he  was very sorry it happened.

He told 12News he’d given his clerk a couple days off following the shooting.

The clerk received minor injuries in the incident police said.

This is a developing story. We will update with more if and when we receive more confirmed information.

RELATED: Texas Rangers investigating after Hardin County deputy shoots, kills Kountze man who threatened him with knife sheriff says

RELATED: Veteran shot Port Arthur man who followed his family home after road rage incident, investigators say