A South Korean ship and its captain, seized and detained in Iran since January, were released on Friday, South Korea's foreign ministry said.