; or (B) fully complying with section 642 of the Illegal Immigration Reform and Immigrant Responsibility Act of 1996 ( 8 U.S.C. 1373 ), and, as a consequence of the statute or other legal requirement of the State or other political subdivision, the subdivision released the alien referred to in paragraph (1) from custody prior to the commission of the crime referred to in that paragraph, the State or other political subdivision that enacted the statute or other legal requirement, shall be deemed to be the proper defendant in a cause of action under this subsection, and no such cause of action may be maintained against the political subdivision which declined to honor the detainer. (4) Attorney’s fee and other costs In any action or proceeding under this subsection the court shall allow a prevailing plaintiff a reasonable attorneys fee as part of the costs, and include expert fees as part of the attorneys fee. 1111. Clarification of congressional intent Section 287(g) of the Immigration and Nationality Act ( 8 U.S.C. 1357(g) ) is amended— (1) in paragraph (1) by striking may enter and all that follows through the period at the end and inserting the following: shall enter into a written agreement with a State, or any political subdivision of a State, upon request of the State or political subdivision, pursuant to which officers or employees of the State or subdivision, who are determined by the Secretary to be qualified to perform a function of an immigration officer in relation to the investigation, apprehension, or detention of aliens in the United States (including the transportation of such aliens across State lines to detention centers), may carry out such function at the expense of the State or political subdivision and to the extent consistent with State and local law. No request from a bona fide State or political subdivision or bona fide law enforcement agency shall be denied absent a compelling reason. No limit on the number of agreements under this subsection may be imposed. The Secretary shall process