A Palestinian man opened fire with a sub-machine gun on an IDF post near the West Bank settlement of Ofra, north of Ramallah, on Wednesday.

One soldier returned fire and confirmed that the shooter was hit, the IDF said. According to Palestinian sources, the shooter was killed.

The soldiers “acted swiftly and professionally to prevent casualties. We will continue to stand guard and protect Israeli civilians from terror acts such as this one,” IDF spokesman Lt. Col. Peter Lerner said.

Reports said the gunman fired 17 rounds. There were no wounded among IDF troops.

Large IDF forces are at the scene of the incident, and the security services have launched an investigation.