JERUSALEM — Israel shot down a Syrian fighter jet on Tuesday after it penetrated Israeli-controlled airspace over the Golan Heights, the military said, a rare encounter that underscored the heightened risk of confrontation in the area.

As Syrian government forces advance to retake areas long held by rebels along the frontier with Israel, the military said it fired two Patriot surface-to-air missiles at the plane.

The downing of the jet, which crashed on the Syrian side of the Golan Heights, was only the second time during the seven-year-old Syrian war that Israel had intercepted a warplane. The first was in 2014.

Israeli forces were on alert for any possible Syrian retaliation. Tensions in the area were already high as Syrian government forces advanced. But Syria, which has long been in a state of war with Israel, has so far avoided fighting on the Israeli front, focusing instead on its internal enemies and largely maintaining the truce with Israel that has held since 1974.