Moscow is determined on one hand to prevent Iran from developing nuclear weapons , but eager on the other to avoid an American-led effort to impose sanctions or to use force against a country with which Russia has close diplomatic and economic ties .