JERUSALEM (Reuters) - Israel's political leaders pushed to attack Iran at least three times in the past few years but had to back down on the advice of the military and due to concerns about its ally the United States, former defense minister Ehud Barak said.

In interviews to his biographers aired late on Friday by Israel's Channel Two, Barak said he and Prime Minister Benjamin Netanyahu had wanted military operations against Iranian nuclear facilities in 2010, 2011 and 2012.

Israel has regularly hinted it could attack Iran to stop it getting nuclear weapons, something Teheran denies it is seeking.

In 2010, the Israeli leadership wanted an attack but the military said it did not have "operational capability," said Barak, defense minister between 2007 and 2013, and prime minister in 1999-2001.

In 2011, two ministers in a top security forum convened to discuss an attack changed their mind and decided against it, Barak said.

In 2012 the timing coincided with a joint military exercise with the United States. "We intended to carry it out," Barak said, but going ahead with an attack on Iran while U.S. forces were conducting the exercise would have been bad timing.

"You're asking and demanding America to respect your sovereignty when making a decision to do it even if America objects and it's against her interests, you can't go in the opposite direction and force America in when they're here on a drill that was known ahead of time," Barak said.

Netanyahu's spokesman could not be reached for comment.

Like Israel, the United States, had said military action was an option if diplomatic efforts failed to prevent Iran developing nuclear weapons. The Obama administration says a deal agreed with Tehran in July will prevent Iran getting the bomb.

That agreement is opposed by Israel, which believes it will be ineffective and allow Tehran to exert greater international influence.

(Writing by Maayan Lubell; Editing by Robin Pomeroy)