DUBAI—Israel’s military shared with journalists documents that it said its soldiers found in Gaza and that appear to show financial and military support provided by Iran to Palestinian Islamist militant group Hamas before the Oct. 7 attacks.

The Israeli armed forces gave The Wall Street Journal a series of what it described as letters and notes from meetings of the Hamas leadership as Israel weighs a retaliatory strike against Iran after Tehran fired a large salvo of missiles at Israel this month.

A major counterattack would deepen tensions across a region already teetering on the edge of a broader and more intense conflict.

The papers shown to the Journal suggest that Hamas leader Yahya Sinwar was negotiating with Iran over funding for a planned large-scale assault on Israel as far back as 2021.

In one of the letters, written in Arabic, Iran says it has allocated $10 million for Hamas’s armed wing. A few weeks later, Sinwar asks Iran for $500 million, divided into $20 million a month for about two years.

Other documents were shared with different media outlets. The officials who provided the documents declined to say why they were releasing them now.

The Wall Street Journal hasn’t independently verified the documents, most of which the Israeli military said it discovered on Jan. 31 in an underground bunker in the Gaza Strip city of Khan Younis, Sinwar’s hometown.

Hamas didn’t respond to a request for comment.

Iran’s permanent mission to the United Nations in a statement said Hamas has acknowledged that its armed wing planned and executed the Oct. 7 attacks without the knowledge of even its political officials based in Doha.

Any claim attempting to link the attacks “to Iran or Hezbollah—either partially or wholly—is devoid of credence and comes from fabricated documents,” the mission said.

Both Iran and Hamas have acknowledged some Iranian financial and military support for the Palestinian militant group, though many details of Iranian support remain unclear or in dispute. Western officials have estimated that Iran handed tens of millions to the group .

Hamas and Hezbollah officials have offered conflicting accounts of Iran’s possible prior knowledge. The Wall Street Journal has reported that some Hamas and Hezbollah officials said Iranian security officials greenlighted the attack, noting that others questioned that account.

The Israeli military also shared an undated presentation it said it found on a Hamas computer near Gaza City on Nov. 10 which described Hamas’s plans for an attack on Israel that was more ambitious than what eventually occurred.

It described gathering 3,100 aerial photos covering 90% of Israel as it assessed the country’s vulnerabilities, with plans for simultaneous attacks targeting airports and other critical infrastructure and a takeover of Israel’s legislature in Jerusalem.

Other targets would include a set of towers in Tel Aviv near the Israeli Defense Ministry’s headquarters, aiming for the sort of symbolism that came with the destruction of the World Trade Center on 9/11, the plan said.

The plans also suggested the idea of using horses and chariots to move Hamas militants through Israel, and included a slideshow with an image of two horses and a chariot beside a picture of an Egyptian pharaoh riding in a chariot with a bow-and-arrow.

In the actual Oct. 7 attack, Hamas militants used motorcycles, pickup trucks and paragliders to sweep into Israel. Hamas and other militants killed 1,200 people, including women and children, and kidnapped around 250 others.

The attack led to the current conflict in Gaza, where Palestinian health authorities say almost 42,000 people have been killed, most of them civilians. The figures don’t distinguish between combatants and noncombatants.

Other, undated letters from Hamas to Iran, provided by the Israeli military, suggest the two sides deepen cooperation and organize joint military, intelligence and logistical plans for future conflicts with Israel.

The letters propose developing better drone, air defense and communications systems together.

Together, “we will uproot this monstrous entity, change the face of the region together,” Sinwar wrote in a letter to the head of the Quds Force, an arm of Iran’s Islamic Revolutionary Guard Corps.

Israel in recent weeks has shifted its focus to its northern border, where Hezbollah, a key ally of Iran, began firing rockets at Israel a day after Hamas led the Oct. 7 attacks.

Israel in recent weeks has killed Hezbollah’s leader and senior Iranian officials working alongside the Lebanese militia. That has drawn Iran deeper into the conflict. Earlier this month it fired a barrage of about 180 missiles at Israel .

Israeli Prime Minister Benjamin Netanyahu has vowed a painful response.

Some files provided by the Israeli military dating back to 2019 describe how a Hamas delegation traveled to Iran to meet leader Ayatollah Ali Khamenei and Qassem Soleimani , then the head of the Islamic Revolutionary Guard Corps’ overseas operations unit, the Quds Force.

Soleimani, who was killed a year later by a U.S. airstrike in Iraq , told the Hamas delegation that they had few military allies in the region. Turkey, which hosted some Hamas officials , was sympathetic, he said, but couldn’t provide “a single bullet.”

“The reality,” Soleimani said, “is that there is no one but Iran.”

Write to Rory Jones at Rory.Jones@wsj.com