The top US military officer said on Tuesday Iran was complying with the pact curbing its nuclear program and warned that any American decision to walk away from it would make other nations less likely to enter into agreements with the United States.President Donald Trump is considering whether to withdraw the United States from the 2015 nuclear deal between Iran and world powers, calling the accord an "embarrassment."Marine Corps General Joseph Dunford, chairman of the Joint Chiefs of Staff, said during testimony before the Senate Armed Services Committee that Iran was complying with its obligations under the nuclear deal, but had increased its activity in other areas."Iran is projecting malign influence across the Middle East, threatening freedom of navigation, while supporting terrorist organizations in Syria, Iraq and Yemen," Dunford said.The committee's top Democrat, Senator Jack Reed, asked Dunford whether walking away from the Iran nuclear pact would affect the US ability to negotiate with North Korea or come up with a non-military solution toward Pyongyang."It makes sense to me that our holding up agreements that we have signed, unless there is a material breech, would have an impact on others' willingness to sign agreements," Dunford said during his reappointment hearing.Trump this year also announced he would withdraw the United States from the international Paris climate agreement.US officials, including senior military leaders, have said that the first option to deal with the threat posed by North Korea's nuclear and ballistic missile program is through diplomacy.The ambassadors to the United States from Britain, France, Germany and the European Union all strongly backed the nuclear agreement with Iran on Monday as long as Tehran continues to comply with the pact.If Trump does not recertify by Oct. 16 that Iran is complying with the pact, Congress would have 60 days to decide whether to reimpose sanctions on Tehran suspended under the accord.That would let Congress, controlled by Trump's fellow Republicans, effectively decide whether to kill the deal. Although congressional leaders have declined to say whether they would seek to reimpose sanctions, Republican lawmakers were united in their opposition to the deal reached by Democratic former President Barack Obama.A collapse of the deal could trigger a regional arms race and worsen Middle East tensions.