The return of the crew was coordinated with Washington and Tehran, according to Pakistan's foreign ministry.