Golkar party chairman Akbar Tanjung said at a joint signing ceremony for the newly formed pro-Megawati Nationalist Coalition: "This decision was made after travelling a long road and having many long conversations along the way.
"The reason we are supporting the president is because her party has the same vision and mission as Golkar," he said on Thursday.
The announcement puts to rest weeks of speculation about whether Golkar, which controls the largest block of seats in the national assembly (DPR), would side with Megawati or the upstart challenger Susilo Bambang Yudhoyono (commonly referred to as SBY).
Tanjung will be looking for several senior cabinet positions in exchange for Golkar's support.
Although widely disliked for its ties to the 32-year-long Suharto regime, Golkar remains a formidable force in Indonesian politics.
The Christian-dominated Peace and Prosperity Party (PDS) and Vice-President Hamzah Haz's United Development Party (PPP) - which once opposed Megawati's candidacy, arguing that the Quran prohibited female leaders - also joined the coalition with the president's Indonesian Democratic Party of Struggle (PDI-P).
On paper, the coalition - it controls more than 65% of the 550 seats in the DPR - gives the president a commanding lead before the election of 20 September.
Challenger Susilo is seen to be
more in touch with voters
However, six years after pro-democracy street demonstrators forced Suharto from power, the evidence suggests Indonesian voters of all stripes are unwilling to blindly follow party leaders.
Golkar won the largest number of votes in April's legislative elections but its presidential candidate, former military chief Wiranto, finished third in July's first round presidential ballot. Only the top two finishers proceed to the second round.
In addition, several prominent Golkar party executives and millions of one-time Megawati supporters have defected to her former security minister Susilo's campaign.
"I painted my face and voted for PDI-P in 1999 because she represented the little people but there's no way I'll vote for her again," said Moerdani, a pedi-cab driver in Labuan, West Java.
"I painted my face
and voted for PDI-P in 1999 because she represented the little people but there's no way I'll vote for her again. She got power and then forgot about us"
Pedi-cab driver Moerdani
"She got power and then forgot about us. She has no support here anymore. Next month I vote SBY and if he betrays me, I'll vote for someone else the next time."
Since July's first round presidential elections winnowed the field of prospective candidates from five down to two, support for Susilo has grown to 60%. Roughly one in five voters is still undecided.
In contrast to Megawati, whom many Indonesians consider aloof and cold, Susilo's handlers have cultivated his image as a man of the people.
While the president oversaw Tuesday's independence day ceremonies from a balcony at the national palace, SBY joined potato-sack races in a middle-class Jakarta neighbourhood.
"I like it that he does not take himself so seriously," says Agus Huki, 31, a salesman in the predominantly Christian island of Sumba, who voted PDS in April's legislative elections.
There is no evidence Indonesia's Christians, who account for roughly 9% of the population, vote as a block. However, Susilo's vice-presidential running mate, Jusuf Kalla, is widely seen as anti-Chinese, the majority of whom are Christian, so PDS's support for Megawati could give this constituency a reason to vote for her.