"We took the initiative and led the effort to try to figure out if before we go to war there actually might be a peaceful solution," Kerry told a group of reporters.
Iran reached a landmark preliminary agreement with six world powers, including the United States, in November to halt its most sensitive nuclear operations, winning some relief from economic sanctions in return.
U.S. President Barack Obama, like his predecessors, has said that all options are on the table with regard to Iran's nuclear program, using diplomatic code for the possibility of military action.
While U.S. officials have long held out that threat, Kerry's comments appeared to indicate the Obama administration would seriously consider a strike on Iran if the diplomatic talks fail.
"I happen to believe as a matter of leadership, and I learnt this pretty hard from Vietnam, before you send young people to war you ought to find out if there is a better alternative," said Kerry, who served in the Vietnam War as a young U.S. naval officer.
"That is an obligation we have as leaders to exhaust all the remedies available to you before you ask people to give up their lives and that is what we are doing" with Iran, he added.
The Obama administration is under pressure from Republican lawmakers threatening to revive a bill that would impose new sanctions on Iran, a move the White House is warning could interfere with delicate nuclear talks to find a lasting agreement. Iran denies allegations by the United States and some of its allies that it is seeking to develop the capacity to build nuclear weapons.
Pressure from lawmakers may increase with signs that easing of sanctions pressure on Tehran has boosted oil export.
Sources who track tanker movements told Reuters that Iran's oil exports rose further in February for a fourth consecutive month. In addition extra cargoes had headed to Syria and South Korea in February, according to a second tracking source.
Kerry said Iran was so far keeping its end of the bargain under the Nov. 24 agreement by, among other things, reducing its stock of 20 percent enriched uranium, not enriching uranium above a purity of 5 percent and not installing more centrifuges.
"Generally speaking, they have done I think everything that they were required to do with respect to the reductions," Kerry told reporters.
"There's no centrifuge challenge. They haven't put any in. They ... have reduced their 5 percent. They have reduced the 20 (percent)," he added. "They are in the middle of doing all the things that they are required to do."
Live: BSE Sensex