ISTANBUL — An explosion from an "external source" struck an oil tanker while it was in port in Jiddah, Saudi Arabia, early Monday, the ship's owner said in a statement. It caused hull damage but no injuries and was the latest in a series of attacks on tankers or oil installations in and around the kingdom amid a civil war in neighboring Yemen.

The Singapore-flagged ship, the BW Rhine, was conducting discharging operations when it was struck at 12:40 a.m. local time, according to Hafnia, the ship’s owner, which said it was possible that “some oil had escaped from the vessel.” A fire that broke out on board was extinguished and all 22 crew members were safe, the company said.

An alert from the United Kingdom Maritime Trade Operations said Jiddah’s port was closed after the explosion amid “unconfirmed reports of a second vessel being involved in an incident.”

Later on Monday, the state-run Saudi Press Agency quoted an unnamed official in the Energy Ministry as saying that the explosion was caused by a boat loaded with bombs, without saying who was responsible. The official said the incident was a criminal act and “a terrorist attack” and noted that it came shortly after an attack on another ship in Shuqaiq in northern Jiddah on Nov. 25.

Yemen’s Houthi rebels have in the past claimed attacks on Saudi Arabia’s energy infrastructure, including a cruise missile strike on a plant in Jiddah last month operated by the Saudi oil giant Aramco. The Iranian-allied Houthis and Saudi Arabia are adversaries in Yemen’s war, which intensified in March 2015 after the intervention of a Saudi-led military coalition.

The war has saddled Yemen with one of the world’s worst humanitarian crises and raised concerns for the safety of ships in the Red Sea, off Yemen’s western coast.

An attack last year on Aramco facilities in eastern Saudi Arabia shook world oil markets and drove up tensions between Iran and its foes in the Persian Gulf. The Houthis initially took responsibility for the attack, but Saudi Arabia and the United States said it was carried out by Iran, which Tehran’s government denied.

Sarah Dadouch contributed to this report from Beirut.