An ax-wielding man attacked a Baton Rouge police officer Thursday night, injuring the officer before stealing his police unit and fleeing, authorities said.

Police soon tracked the stolen vehicle to West Baton Rouge Parish, where spike strips helped lead to the capture of Deandre James Trahan, Baton Rouge police said.

Trahan, 41, crashed the stolen BRPD cruiser into a ditch on U.S. 190 about 11:35 p.m. following a brief pursuit, and afterward, authorities arrested him, said Cpl. L’Jean McKneely, a Baton Rouge police spokesman.

“Our job is very dangerous,” McKneely said. “We deal with certain types of calls on a daily basis, and you just never know what you’re going to be confronted with.”

The wild events leading to Trahan’s arrest began about half an hour earlier in a residential neighborhood a few blocks north of LSU, McKneely said.

Police were dispatched about 11 p.m. to West Garfield Street, where a man was seen attempting to break into multiple homes using an ax. Area residents recognized the ax-wielder as Trahan because he lived in the area, McKneely said.

Multiple police units were in the area looking for Trahan following the reports by area residents when one officer, a 29-year-old man, thought he saw the suspect.

The officer, a three-year veteran, was in the 400 block of West Johnson Street when the sighting occurred, McKneely said.

But before the officer fully exited his police cruiser, Trahan was on him, McKneely said.

A brief struggle ensued. Before too long, Trahan shoved the officer to the ground, jumped in the police unit and drove away, McKneely said.

The 29-year-old officer was not struck with the ax.

Because the area was saturated with police looking for Trahan, other officers responded to the injured officer before Trahan was out of sight, McKneely said.

Authorities used the GPS installed in the police unit to track the vehicle’s whereabouts. By the time police caught up with Trahan, he was driving on La. 415 in West Baton Rouge Parish, McKneely said.

Authorities deployed at least one spike strip during the pursuit. It wasn’t long after Trahan drove over the spike strip that he crashed into the ditch, McKneely said.

State Police and West Baton Rouge Parish sheriff’s deputies assisted Baton Rouge police with the pursuit.

Trahan exited the stolen unit following the crash, but authorities shocked him multiple times with a stun gun, which allowed them to quickly detain him, McKneely said.

When police examined the stolen unit, the ax was still inside, McKneely said.

The injured officer and Trahan were hospitalized following the incident. The officer, whose identity was not released by police, was treated and released with “moderate injuries,” McKneely said.

Trahan, 811 W. Garfield St., was taken from a hospital to the East Baton Rouge Parish Prison. He was booked on counts of armed robbery and criminal damage to property.

As of Friday afternoon, it wasn’t clear whether Trahan’s bail had been set.

McKneely said police aren’t yet sure about the motive behind Trahan’s actions. Trahan could be booked on additional counts as the investigation progresses, McKneely said.

“It’s fortunate that no one lost their life,” McKneely said.

Follow Ben Wallace on Twitter, @_BenWallace.