Secretary of State John Kerry on Wednesday slammed Israeli Prime Minister Benjamin Netanyahu’s opposition to a potential nuclear deal with Iran, calling it as wrongheaded as the prime minister’s backing of the Iraq War.

“Israel is safer today with the added time we have given and the stoppage of the advances in the nuclear program than they were before we got that agreement, which by the way the prime minister opposed,” Kerry said during a House Foreign Affairs Committee hearing. “He was wrong.”

Kerry was later asked to address Netanyahu’s criticism of a hypothetical deal with Iran as a threat to Israel.

“The prime minister was profoundly forward-leaning and outspoken about the importance of invading Iraq under George W. Bush,” Kerry replied. “We all know what happened with that decision.”

The secretary of state again pointed out that while Netanyahu opposed the interim deal reached with Iran in 2013, that accord froze the country’s nuclear program. He warned that the prime minister shouldn’t make another premature judgment about the nuclear talks going forward.

“We won’t take a backseat to anybody in our commitment to the state of Israel, but [Netanyahu] may have a judgment that just may not be correct here,” Kerry said.