A Pennsylvania state trooper was shot multiple times on Tuesday during a shootout while conducting a traffic stop, officials said.

The unidentified trooper was conducting a traffic stop on Route 33, near Route 191 in Plainfield Township, just before 11 a.m. when the gunman began shooting at the trooper.

Both sides fired at each other until the gunman fled the scene and drove himself to a nearby hospital, officials said. Police took the suspected driver into custody as he was being treated for gunshot wounds.

The trooper was airlifted to the hospital and is also being treated for his gunshot wounds. Police did not specify what condition he was in.

It’s unclear how the shootout began.