The Obama administration’s Iran strategy has worked so far. Unprecedented pressure has forced Tehran to the negotiating table. It will take extraordinary diplomatic skills to reach a settlement in the talks this weekend among Iran and the “P5+1” — the United States, Britain, Russia, China, France and Germany. But there is too much pessimism in the air. A robust deal is possible if, as with any successful negotiation, both sides can come away with something.

What would a deal look like? The United States has long demanded that Iran stop all enrichment of uranium, a process that allows it to produce the fuel necessary for an atomic bomb. Iran has insisted it has the right to enrich for a peaceful nuclear program. Now, it seems a smart compromise might be reached. Washington has signaled that it will ask Iran to stop enriching uranium to 20 percent, the level from which fuel can be easily converted for military purposes. Iran has indicated that it might be willing to accept such a limit and would enrich up to only 3.5 or 5 percent. Then Iran could claim that it has preserved its right to enrichment.

Iran would still have a stockpile of uranium enriched to 20 percent, produced over the past two years, perhaps enough to make a nuclear bomb. Tehran has rejected Washington’s demands that this uranium be shipped abroad for safekeeping, saying it is needed for the production of medical isotopes. But Iran almost accepted a deal on this point in 2009 and proposed one in 2010 in which it would have shipped out low-enriched uranium. Statements from officials on both sides suggest that they might embrace elements of those proposals, which involved shipping away some of Iran’s uranium stockpile in return for completed fuel plates that are used in the process of making medical isotopes.

There have been reports that Washington will demand that Iran shut down its Fordo nuclear plant, where high-level enrichment takes place in a facility buried in a mountain near Qom. (Israeli Prime Minister Benjamin Netanyahu publicly demanded this last week.) Iran has refused, saying it has the right to position nuclear facilities wherever it wants as long as its program is peaceful. Washington should soften its stance on this issue as long as Iran accepts intrusive inspections so it can be independently confirmed that the program is peaceful.

The crucial point on which Iran should make deep concessions is comprehensive inspections. The 2011 International Atomic Energy Agency report lays out a series of indicators that Iran is pursuing a weapons program. The P5+1 should use that as a checklist of activities that Iran would commit to refraining from and insist that Iran allow the IAEA unfettered access to its sites until the agency is satisfied that any such military program has been shut down. Iran would have to receive some reward for accepting such unprecedented inspections, and the obvious option would be the relaxation of sanctions, step by step, as inspections proceed unimpeded.

For any deal to stick, it has to be accepted by two groups. There are reasons to think Iran’s hard-liners, led by Supreme Leader Ayatollah Ali Khamenei, might be amenable. Khamenei has consolidated power: He has beaten back the Green movement; accommodated one key rival, Ali Akbar Hashemi Rafsanjani; and sidelined another, President Mahmoud Ahmadinejad. Khamenei has also given himself room to make concessions on the nuclear program.

Consider this categorical statement he made in February: “The Iranian nation has never pursued and will never pursue nuclear weapons . . . because the Islamic Republic, logically, religiously and theoretically, considers the possession of nuclear weapons a grave sin and believes the proliferation of such weapons is senseless, destructive and dangerous.” Khamenei might well have been laying the ground to explain concessions to his audience at home.

The Obama administration’s strategy is to tell Iran: All we are asking is that you demonstrate this in concrete actions. That’s a smart way to frame its demands. But if Iran does make concessions, the United States would have to accept them and relax some sanctions. And this is where the second important group, Republicans in Washington, could be an obstacle. If they demagogue any deal, or refuse to reciprocate on sanctions, there will be no deal.

The administration has handled its allies, Russia, China, the United Nations and even Tehran with skill. To succeed, however, it has to tackle its most formidable foe, with whom it has not had much negotiating success: Republicans.

comments@fareedzakaria.com