If under applicable law the Secretary concerned decides to transfer out of Federal ownership any lands covered in whole or in part by a right-of-way, including a right-of-way granted under the Act of November 16, 1973 (
87 Stat. 576;
30 U.S.C.
185), the lands may be conveyed subject to the right-of-way; however, if the Secretary concerned determines that retention of Federal control over the right-of-way is necessary to assure that the purposes of this subchapter will be carried out, the terms and conditions of the right-of-way complied with, or the lands protected, he shall