Saudi authorities received a help request from a distressed Iranian oil tanker off its coast in a message delivered through the United Nations in New York.
The state-run Saudi Press Agency (SPA) on May 2 said that "the kingdom received an official request for help, through its permanent delegation to the United Nations in New York, from the Iranian charge d'affaires in the Iranian delegation."
"All necessary precautions were taken for the safety of the crew and to ensure there is no environmental damage and to provide assistance," it added.
Saudi Arabia, a mainly Sunni Muslim country, and Shi'ite-led Iran are bitter rivals in the region. Diplomatic relations between the two countries were broken off in 2016.
SHANA, the Iranian Oil Ministry news agency, on May 2 said that the Happiness I oil tanker was forced to seek repairs in a Saudi port after suffering "engine failure and loss of control."
"One of the National Iranian Tanker Co.'s tankers, moving through the Red Sea toward the Suez Canal, failed to continue its path due to water leaking into its engine room," SHANA reported.
"With the coordination of the relevant officials, the ship was guided to Jiddah as the nearest safe port to fix the problem and take the necessary measures."
Riyadh said Saudi vessels belonging to the border guards, the Saudi Ports Authority, and state oil giant Saudi Aramco were involved in the rescue operation.
Iranian officials said the incident occurred on April 30 and that water had leaked into the tanker's engine room, according to Iran's official IRNA news agency.
Saudi state media and SHANA reported that all 26 crew members, including 24 Iranians and two Bangladeshis, were safe.
The reports did not specify the crew members' current location and did not elaborate on whether oil had spilled from the tanker.
But the state-run National Iranian Tanker Co. said there had been no leak of the ship's contents into the Red Sea.
The TankerTrackers monitoring group estimated the vessel is carrying up to 1.22 million barrels of crude oil.
The reports did not state the immediate location of the ship or say if had left the Saudi port, but the website MarineTraffic.com, which tracks vessels at sea, on May 2 located the Happiness I about 40 kilometers off the Jiddah port.