Deputy Prime Minister and Defence Minister Władysław Kosiniak-Kamysz signed the agreement at a high-profile ceremony in Warsaw on behalf of the government, alongside Finance and Economy Minister Andrzej Domański.
EU Budget Commissioner Piotr Serafin and Defence Commissioner Andrius Kubilius signed on behalf of the European Commission, the bloc's executive arm.
Poland is the largest beneficiary of the SAFE initiative and the first country to sign a loan agreement under the programme.
Serafin and Kubilius are expected to travel from Warsaw to Lithuania, which is also among the first countries set to receive funding under the scheme.
Poland plans to place most procurement orders with domestic defence manufacturers.
The funds will support projects including the country's flagship Eastern Shield programme, anti-drone and air defence systems, artillery and upgrades to military transport infrastructure.
The government has said that 89 percent of the funding will be spent within Poland, benefiting domestic industry and the wider economy.
Poland expects to receive an initial payment of around EUR 6.5 billion from the European Commission by the end of May.
Friday's signing follows a political dispute in Warsaw.
On March 12, President Karol Nawrocki, an ally of the opposition, vetoed legislation that would have facilitated Poland's participation in the SAFE programme by creating a special fund for EU money.
The government responded the next day by adopting a resolution authorising the defence and finance ministers to sign the loan agreement on its behalf under the "Arming Poland" programme.
The SAFE initiative offers up to EUR 150 billion in loans by 2030 to support joint defence procurement by participating countries.
It was established last year to help EU countries strengthen their military capabilities amid Russia's war in Ukraine and uncertainty over future US engagement in Europe.
The programme also aims to reduce reliance on US-made weapons and boost Europe's defence industry.
(gs)
Source: IAR, PAP
Click on the audio player above for a report by Agnieszka Bielawska.