President Barack Obama, right, meets with Israeli Prime Minister Benjamin Netanyahu in 2013. (Charles Dharapak/AP)

President Obama on Tuesday said that the possibility of peace between the Israelis and the Palestinians seems “very dim” in the wake of comments Israeli Prime Minister Benjamin Netanyahu made before his reelection last week.

Netanyahu had said shortly before the election that he opposed a two-state solution to the Israeli-Palestinian conflict, though he walked back the comments after he was reelected. Even if you accept the reversal, “it’s hard to envision” how to get to a secure Palestinian state and a “fully recognized Jewish state of Israel,” Obama said.

“There still does not appear to be a prospect of a meaningful framework established that would lead to a Palestinian state,” Obama said during a news conference Tuesday.

Obama said he remains committed to keeping Israelis safe, but also said he would reevaluate how to handle the relationship between the two countries in the wake of Netanyahu’s comments.

While Obama was careful to dismiss suggestions that there was a personal issue between the two leaders, calling their relationship “very businesslike,” he was still sharply critical of his Israeli counterpart. His remarks were some of his most expansive on this subject and came as the White House has made a series of comments rebuking Netanyahu for his remarks. A day before Obama spoke, White House Chief of Staff Denis McDonough described Netanyahu’s remarks as “so very troubling.”

Meanwhile, Obama declined on Tuesday to address reports that Israel had spied on the talks involving Iran’s nuclear program, but he said there will be “significant transparency” involved in any possible deal.

“As a general rule, I don’t comment on intelligence matters in a big room full of reporters,” Obama said at the news conference. “And I think I’ll continue that tradition. But with respect to the possibility of an agreement that ensures that Iran doesn’t get a nuclear weapon, we have not just briefed Congress about the progress or lack thereof, but we also brief the Israelis and our other partners in the region and around the world.”

Obama said that a potential deal would be shown to others, rather than agreed upon in secret.

“If, in fact, an agreement is arrived at that we feel confident will prevent Iran from obtaining a nuclear weapon, it’s going to be there for everyone to see,” he continued. “People are going to be able to lift up the hood and see what’s in there. So, I have confidence that if there’s an agreement, it’s going to be a good agreement.”

Obama on Tuesday promised that “our military and intelligence cooperation with Israel will continue.”

The Wall Street Journal reported Monday night that Israel had spied on the closed-door negotiations involving the United States and other countries over limiting Iran’s nuclear ambitions. In addition, Israel shared some of the information with lawmakers in the United States and others in an attempt to undermine the negotiations, providing details that the Obama administration considered classified, according to the Journal’s report.

Israeli officials have denied the report. Avigdor Lieberman, the Israeli foreign minister, told the country’s Army Radio that the allegations are “not accurate,” suggesting instead that they may have gotten their confidential information by spying on other countries engaged in the nuclear talks.

“There are enough participants involved [in the talks], such as the Iranians,” Lieberman said, according to the Times of Israel. “We got our intelligence from other sources, not from the United States. The instruction has been clear for decades now: you don’t spy on the United States, directly or indirectly.”

Obama commented on the remarks during a joint news conference with Afghanistan’s President Ashraf Ghani to discuss the U.S. military presence in that country. 

[Read: Allies spy on allies all the time. Did Israel do something worse?]

State Department spokesperson Jen Psaki declined to discuss the allegations on Tuesday, saying: “We’re not going to comment on intelligence matters, whether ours or those of other countries.”

However, Psaski disputed the notion that Congress needs to get its information on the ongoing negotiations from anyone other than the Obama administration. Psaski also said members of Congress or their staffs have been briefed in more than 230 meetings, including 60 in the last four weeks alone. She said full details have been provided during classified meetings.

“Congress has been briefed extensively, thoroughly and frequently,” she said. “It’s absurd that they would need information from a foreign country.”

Allies routinely spy on one another, something that has been highlighted recently by revelations that the United States may have been monitoring German Chancellor Angela Merkel’s phone for more than a decade. Documents provided by Edward Snowden showed that the National Security Agency had monitored the phone conversations of 35 world leaders, and American allies, particularly in Europe, fumed over the espionage.

President Obama never knew that the NSA’s monitoring program also targeted American allies, something he discovered in 2013 amid a series of revelations coming from Snowden’s documents.

The White House first learned that Israel was possibly monitoring the talks when U.S. intelligence agencies spying on Israel discovered communications containing details from the talks, according to the Wall Street Journal’s report.

This latest revelation comes at a particularly strained moment in the relationship between the Obama administration and Israeli Prime Minister Benjamin Netanyahu, who was reelected to a fourth term in office last week. The White House condemned Netanyahu’s decision to to address Congress earlier this month at the invitation of House Speaker John A. Boehner (R-Ohio), a speech the Israeli leader used to assail the negotiations with Iran. Netanyahu used that speech to decry what he called “a very bad deal,” saying that any agreement would only embolden Iran’s nuclear ambitions.

Obama has been critical of comments Netanyahu made before the recent election. In addition to comments about a two-state solution, Netanyahu had warned on election day that Arab Israeli voters were flocking “in droves” to vote, comments that were widely seen as inflammatory and for which he later apologized. Obama said in an interview with the Huffington Post that this “kind of rhetoric was contrary to what is the best of Israel’s traditions.”

On Tuesday, Obama disputed media reports suggesting that the issues between the White House and Israel were personal problems between him and Netanyahu.

“I have a very businesslike relationship with the prime minister,” he said, going on to say that the problem was not between the two men. “The issue is a very clear, substantive challenge.”

Talks over Iran’s nuclear program are scheduled to resume later this week in Switzerland in a final push to reach a general framework before a self-imposed March 31 deadline. Details of the possible deal have not been made public, but among the chief aims is seeking to limit and closely monitor Iran’s uranium enrichment capacities as part of efforts to keep Tehran from moving toward a nuclear weapon.

The West and its allies worry that Iran could one day upgrade its production of nuclear fuel to make material for an atomic weapon. Iran insists it only seeks reactors for energy production and isotopes for medical applications.

Carol Morello, Fred Barbash and Brian Murphy contributed to this report.

[This post has been updated. First published: 3:09 p.m.]