AMMAN, Jordan — A Jordanian soldier who killed seven Israeli schoolgirls during a class trip to his country was released Sunday, after serving 20 years in prison, an official said.

Ahmed Daqamseh had killed the eighth graders in a 1997 shooting rampage at the scenic “Island of Peace” border post where he was stationed. Seven other girls were wounded at the time.

The late-night release comes a day before the 20th anniversary of the massacre.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

The release could raise tensions between Israel and Jordan. In 2011, Israel summoned Jordan’s ambassador to express anger after the kingdom’s justice minister at the time called for Daqamseh’s release.

Daqamseh was received early Sunday at his family home in the northern Jordanian town of Irbid with celebrations, including music and singing around his home. Media outlets in the kingdom carried photos of the celebrations.

Daqamseh is considered a hero by many in the country. Israeli media reported early Sunday that Jordanian authorities’ decision to release him in the middle of the night, at approximately 2 a.m. Sunday, was intended to prevent larger celebrations from being held for him in his hometown.

Amer Sartawi, a spokesman for Jordan’s Public Security Directorate, said Daqamseh was freed early Sunday.

A military court deemed him mentally unstable at the time and sentenced him to life in prison, which in Jordan typically means 25 years. Jordanian lawmakers had lobbied for his early release.

After the shooting, Jordan’s King Hussein — the late father of the current king, Abdullah II — rushed to Israel and paid condolence visits to the girls’ families, a gesture that touched many Israelis at the time.

The shooting came three years after Israel and Jordan signed a peace treaty.