Iran will free seven of the 23 crew members of a British-flagged oil tanker seized in the Strait of Hormuz in July for allegedly violating Iranian laws, a foreign ministry official announced Wednesday.

While judicial procedure on the Steno Impero is ongoing, Ministry spokesman Abbas Mousavi told state TV that under Iran’s “humane policy” the captain has been asked to let some of the crew return home.

IRANIAN OIL TANKER SOUGHT BY US TURNS OFF TRACKER OUTSIDE SYRIA, LEBANON

The captain selected seven sailors who are Indian nationals to be the ones to leave, Mousavi said.

Erik Hanell, CEO of the Swedish shipping group Stena Bulk that owns the Stena Impero, said it wasn't immediately clear when the seven would be freed. The remaining 16 crew members were to stay aboard the vessel.

"Their ordeal may soon be over, and they may return to their families, however, we cautiously await official confirmation of their release date," Hannell said, adding the announcement was "a positive step on the way to the release of all the remaining crew, which has always been our primary concern and focus."

CLICK HERE FOR THE FOX NEWS APP

The Stena Impero and its crew were detained after authorities in the British territory of Gibraltar seized an Iranian tanker said to be carrying fuel to Syria in violation of EU sanctions on oil sales to Damascus. The Iranian vessel – the Adrian Darya 1 – was released after being held for weeks and later turned off its tracking beacon.

Meanwhile, Iranian President Hassan Rhouhani reiterated a threat that Tehran would take additional steps away from the 2015 nuclear accord on Friday and accelerate nuclear activities if Europe fails to come up with a solution that allows Iran to sell its oil abroad in the aftermath of escalated U.S. sanctions.

The Associated Press contributed to this report.