The DPJ's Yukio Hatoyama is set to become Japan's next PM
Japan's newly-elected Democratic Party (DPJ) has agreed to form a coalition with two smaller parties, officials from the three parties have said.
The deal with the New People's Party and the Social Democratic Party came after agreement was reached on a proposal to move a US base in Okinawa.
Despite winning a landslide victory in last month's election, the DPJ needs support in parliament's upper house.
DPJ leader Yukio Hatoyama is set to be declared prime minister next week.
The DPJ victory on 30 August overturned five decades of near-unbroken rule by Japan's Liberal Democratic Party.
The DPJ won 308 seats of the 480-member lower house but needs the support of the smaller parties in the weaker upper house to ensure bills are not delayed.
"We've finally wrapped up talks. It's good we had a clean outcome. The three party leaders will meet in the afternoon and sign to confirm," said the DPJ secretary general, Katsuya Okada.
Talks had faltered on Tuesday over the wording of a proposal to move a US base in Okinawa and relocate some US troops out of Japan to the US territory of Guam, in the Pacific.
The DPJ has pledged that foreign policy should lean more towards Asia, but Mr Hatoyama has said the alliance with the US remains central to Japan's diplomacy.
Mr Hatoyama is set to be voted in as prime minister on 16 September.
As well as his policy of increasing ties with his Asian neighbours, he has pledged to reduce bureaucrats' control over policy-making.
He has also promised to increase welfare provision, including child benefits, and cut greenhouse gas emissions.