(a)
When a State statute—
(1)
provides for the collection of a tax either by imposing on employers generally the duty of withholding sums from the pay of employees and making returns of the sums to the State, or by granting to employers generally the authority to withhold sums from the pay of employees if any employee voluntarily elects to have such sums withheld; and
(2)
imposes the duty or grants the authority to withhold generally with respect to the pay of employees who are residents of the State;
the Secretary of the Treasury, under regulations prescribed by the President, shall enter into an agreement with the State within 120 days of a request for agreement from the proper State official. The agreement shall provide that the head of each agency of the United States shall comply with the requirements of the State withholding statute in the case of employees of the agency who are subject to the tax and whose regular place of Federal employment is within the State with which the agreement is made. In the case of pay for service as a member of the armed forces, the preceding sentence shall be applied by substituting “who are residents of the State with which the agreement is made” for “whose regular place of Federal employment is within the State with which the agreement is made”.