His exit came after lengthy discussions by the company 's directors in recent days and appeared intended to avert a head-on collision with two regulators : the Securities and Exchange Commission and Eliot Spitzer , the New York attorney general .