WASHINGTON — U.S. Secretary of State John Kerry said Thursday he was hopeful about nuclear negotiations with Iran but that he did not wish to convey optimism ahead of a June 30 deadline for a deal.

“I am always hopeful. Yes, I am hopeful, but I am not conferring optimism,” Kerry told reporters in response to a question after presenting an annual U.S. report on human rights.

Kerry will fly to Vienna Friday to join negotiators from six powers and Iran seeking an agreement under which Tehran would curb its nuclear program in exchange for relief from economic sanctions that have crippled its economy.

Previewing the trip, a senior U.S. official told reporters U.S. negotiators could see a way to a “very good agreement” but that it remained to be seen whether a pact would be reached.

The official, who spoke on condition of anonymity, said all nations involved in the talks were committed to the self-imposed June 30 deadline but it could slip “by a short bit” if necessary to get the substance of any agreement right.

In addition to Iran and the United States, Britain, China, France, Germany and Russia are all part of the talks.

The U.S. and some of its allies suspect that Iran is using its civil nuclear program as a cover to develop a nuclear weapons capability. Iran says its program is solely for peaceful purposes.

The two main sticking points are the timing and scope of sanctions relief and monitoring and verification measures needed to ensure Iran does not cheat on an agreement.

“Despite these tough issues, we can truly see a path forward that gets us to a very good agreement here,” the senior U.S. official told reporters during a conference call.

Prominent former U.S. officials, including five with ties to President Barack Obama’s first term, published a letter Wednesday warning that a deal on curbing Iran’s nuclear program was at risk of failing to provide adequate safeguards.

The letter’s release ahead of what may be the finale to the nuclear talks appeared aimed at pressuring the White House to negotiate a stronger agreement.

Rather than undermining the U.S. negotiators, the letter could strengthen their hand with the Iranians by illustrating the challenge the White House may face in selling any agreement at home, including with the Republican-led Congress.

U.S. lawmakers themselves are sharpening warnings against a “weak” agreement and laying down red lines that, if crossed, could prompt Congress to trip up an agreement.

Several influential lawmakers said they do not want to see any sanctions lifted before Tehran begins complying with a deal, and they want a tough verification regime.

Kerry telephoned Iran’s foreign minister in recent days to tell him that Tehran must answer questions about whether its past atomic research was arms-related if it wants a nuclear deal, officials said.