NEW YORK — In an historic hearing in the federal courthouse in Manhattan on Thursday, U.S. District Court Judge George Daniels said he planned to issue a ruling in the coming days declaring that Iran shares in the responsibility for the 9/11 terror attacks.

“The extensive record submitted to this court, including fact witnesses and expert testimony, is satisfactory to this court,” Judge Daniels said. The court “accepts as true” the various allegations of the plaintiffs and their experts, he declared, and “will issue an order” in the coming days that Iran bears legal responsibility for providing “material support” to the 9/11 plotters and hijackers.

Family members of 9/11 victims who attended the open-court hearing broke into tears. They had nervously sat through a four-hour presentation by attorneys Thomas E. Mellon, Jr., and Timothy B. Fleming, consisting of evidence backing up their claims that Iran had foreknowledge of the 9/11 attacks and actively assisted the hijackers in planning, preparing, and executing their plan.

“My husband’s name is on that lawsuit,” said Fiona Havlish, the lead plaintiff in the case against Iran. Her spouse, Donald G. Havlish, Jr, perished on the 101st floor of the World Trade Center’s South Tower. “This is about my husband, all our husbands, our loved ones, our sons, our daughters.”

Ellen Saracini, whose husband, Victor Saracini, took off that morning at the controls of United Airlines Flight 175, called it “a historic day” because a U.S. court found that Iran was responsible for the attacks. “When I heard the verdict, I just smiled up to Victor and said, ‘we’re still thinking about you up there.’”

In presenting evidence gathered by the attorneys and their outside investigator, Timothy Fleming revealed tantalizing details of still-sealed videotaped depositions provided by three defectors from Iranian intelligence organizations.

One of those defectors was “physically present” when al-Qaida’s second in command, Ayman al-Zawahiri, came to Iran in January 2001 for four days of intense closed-door meetings with the top leadership in Iran to discuss the impending attacks.

Another took part in writing up the debriefing reports of Iran’s al-Qaida liaison, Imad Mugniyeh, once he returned to Iran from Afghanistan after the 9/11 attacks.

The most dramatic moment of the hearing came when Fleming unveiled the identity of a third defector and described in detail the information he had provided.

The defector, Abdolghassem Mesbahi, had been a confidant of Iranian leader Ayatollah Ruhollah Khomeini, the Islamic Republic’s founder, and headed up European operations for the new regime’s fledging intelligence service in the early 1980s.

Then, Mesbahi actively took part in developing a set of terrorist contingency plans, called “Shaitan der atash” — meaning “Satan in the Flames,” or “Satan on Fire” — to be used against the United States.

“This contingency plan for unconventional or asymmetrical warfare against the United States was the origin of subsequent terror attacks against the United States, up to and including the terrorist attacks of 9/11.” Fleming said. “Osama bin Laden and al Qaeda joined the Iranian operational planning in the early to mid-1990s.”

Those earlier “unconventional” attacks included the 1996 Khobar Towers bombing in Saudi Arabia, the 1998 bombings of U.S. embassies in Kenya and Tanzania, and the 2000 attack on the U.S.S. Cole.

In 1996, Mesbahi learned hard-liners within the regime intended to kill him. He fled Iran for Europe, where he was granted political refugee status.

Mesbahi soon became a witness in German court proceedings stemming from the assassination of Kurdish dissidents in the Mykonos restaurant in Berlin, and went to ground in a witness protection program. Known only as “Witness C,” his testimony led the German court to name the top leadership of Iran as personally responsible for ordering the assassinations, and caused the European Union to withdraw their ambassadors from Iran for 18 months.

Ever since then, Mesbahi has been a marked man, hunted by the regime’s intelligence services.

Fleming described Mesbahi’s desperate attempts in the weeks before the 9/11 attacks to contact German and U.S. intelligence agencies, after he received a series of coded messages from one of his former intelligence colleagues in Iran.

The first message, which he received on July 23, 2001, told him that the “Shaitan der atash” contingency plan against the United States had been activated.

Mesbahi knew at that point that something awful was about to occur, but he didn’t know which of the many variants of the plan had been selected, Fleming said. In one version of the plan, Iranian-backed terrorists were supposed to attack gas stations around the United States, causing their underground fuel tanks to explode. In another, they were to attack oil refineries.

The second message, which he received on Aug. 13, 2001, told him which plan had been selected. “This was the plan to crash civilian jetliners into major U.S. cities, including New York and Washington,” Fleming said.

The third message, which Mesbahi received on Aug. 27, told him that “Germany was involved” in some way in the plans. As Fleming pointed out, several of the 9/11 hijackers, including the lead pilot, Mohammad Atta, were working out of Hamburg, Germany.

The 9/11 Commission report referred obliquely to Mesbahi and others who had “some fragmentary knowledge” of the impending attacks in its narrative of the events of the summer of 2001. The “system was blinking red” and U.S. intelligence agencies were receiving “frequent fragmentary reports from around the world,” Mellon, one of the 9/11 families’ attorneys, told the court.

Both Mellon and Fleming saluted the bravery of the three defectors who “risked their lives” to help bring out the truth of Iran’s involvement in the 9/11 plot.

In addition to the defectors, Mellon recruited three senior staff members from the 9/11 Commission to describe the importance of Iran’s efforts to facilitate the travel of the 9/11 hijackers to and from Afghanistan.

Janice Kephart, who authored a separate monograph on the terrorists’ travel for the Commission, told the court that travel facilitation was not just a coincidence. It was “like a military operation” and was “crucial military support” for the 9/11 plot, she said.

Fleming and Mellon explained that Iran sent its top terrorist operative, Imad Fayez Mugniyeh, to Saudi Arabia and Lebanon on several trips to accompany eight to ten of the “muscle” hijackers back to Iran.

This was critical, they said, because the hijackers needed to reach al-Qaida camps in Afghanistan for briefings on the 9/11 operation. But because they were traveling on new Saudi passports and either already had or intended to get U.S. visas, the U.S. might refuse them entry if they had Iranian or Afghan entry stamps.

So without Iran’s decision to allow the future hijackers invisible passage to and from Afghanistan — without stamping their passports — the 9/11 attacks might never have occurred.

As a result, Kephart testified, the U.S. State Department approved 22 of the 23 visa applications submitted by the future hijackers and their associates.

“Today, I feel a great sense of relief,” Mellon said after the judge declared his intention to rule in favor of the 9/11 families. “The families have waited a very long time for this day, so I was greatly relieved for the families. Ten years ago, one of the family members asked me, who was responsible?” for the 9/11 attacks.

“Well, today we have found — the judge has found — that the responsible party was Iran,” he added.

Judge Daniels said he expected to issue a final opinion in the case early next week, finding Iran responsible for the worst terror attacks ever perpetrated on U.S. soil.

Daniels is a judge in the U.S. District Court for the Southern District of New York.