Iran accused the sailors of trespassing but American officials said Tehran has assured them that the crew and vessels would be returned safely and promptly.