; (3) reimburse State, tribal, and local law enforcement agencies for procuring field-testing equipment for use in the identification or detection of heroin, fentanyl, and associated synthetic drugs; (4) investigate, arrest, and prosecute individuals violating laws related to the distribution or sale of heroin, fentanyl, and associated synthetic drugs; and (5) support State, tribal, and local health department services deployed to address the use of heroin, fentanyl, and associated synthetic drugs. (d) Limitation Not less than 60 percent of the amounts made available to carry out this section shall be awarded for the purposes under paragraph (1) or (2) of subsection (c). (e) Authorization of appropriations There are authorized to be appropriated to carry out this section $10,000,000 for each of fiscal years 2018, 2019, and 2020. (f) Allocation (1) Population allocation Seventy-five percent of the amount made available to carry out this section in a fiscal year shall be allocated to each State that meets the requirements of section 2802 so that each State shall receive an amount that bears the same ratio to the 75 percent of the total amount made available to carry out this section for that fiscal year as the population of the State bears to the population of all States. (2) Discretionary allocation (A) In general Twenty-five percent of the amount made available to carry out this section in a fiscal year shall be allocated pursuant to the discretion of the Attorney General for competitive grants to States with high rates of primary treatment admissions for heroin and other opioids, for use by State law enforcement agencies. (B) Considerations In making grants under subparagraph (A), the Attorney General shall consider— (i) the average annual number of part 1 violent crimes reported by each State to the Federal Bureau of Investigation for the 3 most recent calendar years for which data is available