Senators Joseph I. Lieberman and Lindsey Graham, prominent surrogates for Senator John McCain’s presidential campaign, stepped down Wednesday from their positions with an independent group that released a pair of Internet advertisements attacking Senator Barack Obama on Iraq.

Mr. Lieberman, independent of Connecticut, and Mr. Graham, Republican of South Carolina, were both on the policy advisory board to the organization, Vets for Freedom, which on Wednesday released its second Web advertisement in less than a week attacking Mr. Obama.

The senators’ positions with the group, which describes itself as a grass-roots advocacy organization pushing for victory in Iraq and Afghanistan, seemed to place them in contravention of new conflict-of-interest rules released by Mr. McCain’s campaign that specifically prohibit anyone “with a McCain campaign title or position” from participating in a “527 or other independent entity that makes public communications that support or oppose any presidential candidate.”

After inquiries from reporters, the senators released a joint letter to Vets for Freedom on Wednesday saying they had requested a leave from their positions to come into compliance with the new policy.