Udi Levy has told BBC Panorama he advised Benjamin Netanyahu to target Hamas's finances.
He believes this would have hampered the group's military build-up, but says the intelligence was not acted upon.
The Israeli prime minister's office has not responded to the allegations.
Hamas gunmen killed about 1,200 people and took more than 250 hostages on 7 October last year, when they crossed into southern Israel. One hundred and thirty hostages remain unaccounted for.
Israel's military response has killed 29,000 Palestinians, according to Gaza's Hamas-run health ministry.
Mr Levy - who was head of economic warfare in the Mossad, Israel's spy agency, until 2016 - says he told Mr Netanyahu many times that Israel had the means to crush Hamas, which controls Gaza, "by using only financial tools".
Mr Levy says he never got a response to his proposal from Mr Netanyahu.
When asked if he considered there was a connection between Mr Netanyahu's alleged reluctance to deal with Hamas's finances and the 7 October attack, Mr Levy is unequivocal.
"Yes, of course," he says. "There is a very good chance that... we would [have] prevent[ed] a lot of the money" that had gone into Gaza, and that "the monster that Hamas built probably [wouldn't be] like the same monster that we faced on October 7th."
Hamas would have needed "billions, not millions" of dollars, says the former spy chief, to build hundreds of kilometres of tunnels underneath Gaza and pay for an estimated 30,000-strong military force.
One specific funding stream, which Mr Levy says he raised with Mr Netanyahu in 2014, was an alleged multi-million-dollar investment portfolio which Israeli intelligence said was controlled by Hamas and managed out of Turkey.
Mr Levy says that Mr Netanyahu chose not to act on the information.
Following the attacks of 7 October, Israel has vowed to destroy Hamas. But can it? With access to some of Hamas's most closely guarded secrets, John Ware investigates its network outside Gaza.
Watch on BBC One at 20:00 on Monday 19 February (20:30 in Northern Ireland and 22:40 in Wales) or on BBC iPlayer
Hamas, which rejects Israel's right to exist and is committed to its destruction, is much more than just a military force. It's a political movement with financial support extending well beyond Gaza.
"We spoke about Qatar and Iran as the main sponsors," says Mr Levy of his conversations with Mr Netanyahu. "Turkey is even, in some aspect, more important because it is a critical focal point for Hamas to manage [its] financial infrastructure."
Panorama has been investigating documents, which had been acquired in 2020, said to reveal the extent of Hamas's investment portfolio. They are a snapshot of an eight-month period that ends in early 2018. Israeli intelligence says they show how Hamas makes some of its money.
Some 40 companies across the Middle East and north Africa are believed to be in the portfolio, including Saudi Arabia, Algeria, Sudan, Egypt, the Gulf and also Turkey.
The alleged investments include everything from road construction, pharmaceuticals and medical equipment to tourism, mining, gold prospecting and luxury real estate projects.
Since 2022, six of the companies listed in the documents have been designated by the US Treasury as being directly or indirectly owned or controlled by Hamas. The US has restricted their ability to trade by sanctioning them.
Next to each company listed in the portfolio ledger is what is said to be the value of each Hamas-controlled holding, running into the millions of dollars for some of the companies - and adding up to a total value of $422,573,890 (£335m).
Much of that value is said to be tied up in real estate.
Property investments, which hold their value and have the potential for rental income, are a "perfect way" for an organisation such as Hamas to manage its finances, says Tom Keatinge, founding director of the Centre for Financial Crime and Security Studies (CFCS) at the Royal United Services Institute (Rusi).
One of the companies sanctioned by the US is Trend GYO - a Turkish real estate firm. In the 2018
document, it is referenced several times as Anda Turk - which documents show was an old trading name, before it was renamed Trend and floated on the Istanbul stock exchange.
The 7 October attacks or, as Hamas calls them, "Operation Al-Aqsa Flood", were recently praised by Trend's former chairman, Hamid Abdullah al-Ahmar - who stood down in 2022 but remains as the head of Trend's parent company.
Speaking at a conference in Istanbul in January 2024, he was filmed saying: "We meet... while the Aqsa Flood is at its peak, a sweeping and roaring flood that will never stop before the occupation of beloved Palestine is defeated."
He went on to call on the conference to "work to criminalise Zionism as a racist and terrorist movement".
Panorama wrote to Mr al-Ahmar but received no reply.
Trend told us that the US Treasury's allegations of links between the company and Hamas were "unfair and unfounded".
The Turkish authorities have said they have investigated Trend and found "no abuse of our nation's financial system" and that Turkey abides by international financial rules.
Hamas, however, has also had a variety of other long-term financial sources.
One of its most important early fundraisers was Yahya Sinwar, now the head of Hamas's political wing in Gaza. According to Israel, he began raising funds for Hamas while he was in an Israeli prison cell. In 1988, Sinwar had been jailed for murdering Palestinians he suspected were spying for Israel.
Micha Koubi, a former Israel security agency officer says he interrogated Sinwar for more than 150 hours. He said Sinwar managed to forge links with Iran by sending covert messages from prison.
In 2007, a year after Hamas was voted into power, Israel and its neighbour Egypt tightened the blockade on Gaza, both saying they were concerned about their security. Mr Koubi said that Sinwar's Iranian connections helped him to beat the blockade.
"He sent messengers to Iran, to start the contact. He asked them to send... weapons and arms. And they agreed to help [Hamas] with everything that they need.
"That was the very beginning."
Cash for Hamas also arrived from the Gulf state of Qatar, both overtly and covertly, according to former Mossad officer, Udi Levy.
Israel has acknowledged that some of that money was delivered in cash with its blessing. It was allocated to pay the salaries of officials in the Hamas government and provide humanitarian support for the people of Gaza.
"The Qataris [had] a special envoy that came every month, with a private jet to Rafah with a suitcase, enter to Gaza, gave it to Hamas, say hello and go back, that's it," says Mr Levy.
He has told Panorama he believes "a significant sum of this money" went to "support Hamas's military arm".
Billions more had been provided by UN agencies, the EU, the Palestinian Authority in the West Bank, and numerous charities. All intended for humanitarian purposes.
Rusi's Tom Keatinge calls it a "fair assessment" that this money may have been subsidising Hamas's military wing. "It is money [Hamas] can use on other issues, like building tunnels, like arming its military," he says.
It is impossible to know how much donor cash - if any - Hamas may have appropriated for military purposes.
The group denies diverting any aid money. It told Panorama its military wing had its own sources of income.
Israel's Prime Minister has been clear about his opposition to the creation of a Palestinian state, and how that strategic aim was linked to his position on Hamas funding.
In 2019, Mr Netanyahu told colleagues in his ruling Likud party: "Anyone who wants to thwart the establishment of a Palestinian state has to support bolstering Hamas and transferring money to Hamas… This is part of our strategy - to isolate the Palestinians in Gaza from the Palestinians in the West Bank."
Keeping Hamas strong enough to be an effective rival to Fatah - its West Bank rival - would prevent the possibility of a "unified Palestinian leadership with whom you would have to negotiate some kind of final settlement", says Khaled Elgindy, senior fellow on Palestine and Palestinian-Israeli Affairs at the Middle East Institute think tank in Washington DC.
More recently, Mr Netanyahu has denied he wanted to build up Hamas and said he had only allowed Qatari money into Gaza to prevent a humanitarian crisis.
Mr Netanyahu has now vowed to destroy Hamas. There will be "no element" in Gaza that finances terrorism, he says.
But, by destroying so much of Gaza and killing so many Palestinian, Israel may achieve the opposite effect.
"Iran will probably continue to arm and financially support Hamas," says Mr Elgindy. "But more than that, as long as there is a reason for a group like Hamas to try to acquire those weapons, and those resources, and those capabilities, they will do that.
"Because the justification for it, the reasons for it, are still in place."
Newer articles
<p>A US judge has ruled against Donald Trump getting his hush money conviction thrown out on immunity grounds.</p>