Prime Minister Anthony Albanese and Indonesian President Prabowo Subianto ratified the treaty during a signing ceremony in Jakarta on Friday, elevating defence ties between the two countries.
Under the Treaty of Jakarta, both nations would consider a military response if either came under attack.
Mr Albanese said the treaty cemented ties between Australia and Indonesia.
"Australia and Indonesia's relationship is stronger than it has ever been," he told reporters in Jakarta.
"The treaty is a significant extension of our existing security and defence cooperation. It demonstrates the strength of our partnership and depth of our trust and cooperation.
"We are more than just partners. We are close friends."
The agreement means Australia and Indonesia will hold talks at a leader and ministerial level on a regular basis.
The treaty was first unveiled in November during a visit by President Prabowo to Australia.
The agreement would help boost security in the region, the Indonesian president said.
"This treaty reflects the commitment of both countries to continue strengthening co-operation, to maintain their respective security, as well as to contribute concretely to the peace and stability in the Indo-Pacific region," he said.
"Indonesia and Australia are destined to live side by side and we have chosen to establish that relationship founded on mutual trust and goodwill."
The visit by Mr Albanese to Indonesia was his fifth since becoming prime minister in 2022.
As part of the treaty, senior Indonesian officials will be able to be embedded in the Australian Defence Force.
A memorandum of understanding was also signed between Australia and Indonesia's sovereign wealth funds to boost two-way investment.
"I have no doubt that the relationship between Australia and Indonesia will continue to go from strength to strength in the years ahead, and that we will continue working together as neighbours, but more importantly as friends," Mr Albanese said.
"The treaty reflects the close friendship partnership and deep trust between our two nations under our comprehensive strategic partnership."
Foreign Minister Penny Wong joined Mr Albanese on the visit to Jakarta, and met with her Indonesian counterpart Sugiono during the visit.
Indonesia has long upheld a foreign policy of non-alignment to avoid being entangled in conflicts.
Australian Strategic Policy Institute senior analyst Gatra Priyandita said the agreement could be seen as a positive step in the context of the broader bilateral relationship.
"There is going to be no element concerning mutual commitment to each other's security," he said.
Indonesia remained "very allergic" to the idea of defence alliances to preserve its foreign policy settings, Dr Priyandita said.