The measure passed 61-26 with no abstentions in the upper house of parliament, Poland's PAP news agency reported.
The legislation, which was earlier backed by the lower chamber of Poland's bicameral parliament, now reverts to the lower house for a final vote after the Senate made several modifications to the original proposal.
It is then expected to go to President Karol Nawrocki for signing into law.
Nawrocki, a Eurosceptic conservative aligned with the opposition, has voiced doubts about the bill, raising uncertainty over whether he will sign it into law.
Opposition lawmakers have cited concerns including the need for stronger anti-corruption safeguards.
The right-wing Law and Justice (PiS) party and the far-right Confederation group voted against the proposal in the lower house last week.
PiS leader Jarosław Kaczyński said on Monday that Nawrocki should veto the bill, arguing that SAFE has "powerful political implications" and is aimed at uniting Europe "under the German boot."
Government officials say swift enactment of the law is essential for national security.
Prime Minister Donald Tusk on Thursday urged the opposition not to block Poland’s access to SAFE funds, warning that doing so would strike "at the very heart" of national security.
The bill provides for the creation of a special fund managed by state development bank BGK to channel EU money into defence projects.
The Security Action for Europe (SAFE) programme offers up to EUR 150 billion in low-interest loans for military procurement, largely focused on equipment produced in Europe.
It is intended to strengthen EU defence capabilities and reduce reliance on US-made weapons.
EU member states on Tuesday formally approved Poland’s SAFE investment plan, under which Warsaw is set to receive EUR 43.7 billion in loans for 139 projects.
The government says more than 80 percent of the funds would be spent within Poland’s defence industry.
(gs)
Source: IAR, PAP, TVP Info