; and (B) with regard to actions taken to comply with the detainer, shall have all authority available to officers and employees of the Department. (2) Legal proceedings In any legal proceeding brought against a State or a political subdivision of State that has executed an agreement with the Department of Homeland Security under section 287(g) of the Immigration and Nationality Act ( 8 U.S.C. 1357(g) ), or an officer, employee, or agent of such State or political subdivision acting pursuant to such agreement, which challenges the legality of the seizure or detention of an individual pursuant to a detainer issued by the Department under section 236, 241, or 287 of the Immigration and Nationality Act ( 8 U.S.C. 1226 , 1231, and 1357)— (A) no liability for false arrest or imprisonment shall lie against the State or political subdivision of a State for actions taken in compliance with the detainer, which includes maintaining custody of the alien in accordance with the instructions on the detainer form and notifying the Department prior to the alien’s release from custody; and (B) if the actions of the officer, employee, or agent of the State or political subdivision were taken in compliance with the detainer— (i) the officer, employee, or agent shall be deemed— (I) to be an employee of the Federal Government and an investigative or law enforcement officer; and (II) to have been acting within the scope of his or her employment under section 1346(b) and chapter 171 of title 28, United States Code; (ii) section 1346(b) of title 28, United States Code, shall provide the exclusive remedy for the plaintiff