Relatives of three Americans imprisoned in Iran and of a fourth who vanished there eight years ago gave emotional testimony Tuesday to lawmakers in Washington, pressing the Obama administration to do more to free the captives before the June 30 deadline for reaching an international agreement to limit Iran’s nuclear program.

It was the first time that the relatives of all four Americans — Amir Hekmati, 31, Saeed Abedini, 34, Jason Rezaian, 39, and Robert A. Levinson, 67 — appeared together, in the hearing room of the House Foreign Affairs Committee, to publicly share their anguish and frustration over what they described as Iran’s illegal seizure of their loved ones. They said their family members had committed no crimes and were essentially political prisoners and hostages.

Those themes have echoed through a history of mistrust between the United States and Iran ever since the countries broke off diplomatic relations more than three decades ago over the Tehran hostage crisis, in which 52 Americans were held for 444 days.

While the fates of the three Americans imprisoned now and of the fourth, who is missing, are not part of the nuclear negotiations, lawmakers have increasingly framed these cases as barometers of Iran’s trustworthiness in honoring its international pledges. “If top Iranian officials cannot be counted on to assist these wrongfully jailed Americans, can they be counted on to honor the commitments they make at the negotiating table?” asked Representative Ed Royce, Republican of California and chairman of the committee.