Foreign secretary says legislation will be introduced within "weeks".