SYDNEY, Australia  Prime Minister Julia Gillard will form a minority government after two independent legislators voiced their support for her on Tuesday and gave the center-left Labor Party a second three-year term of rule in Australia, ending more than two weeks of political impasse.

“I’ve learned some lessons and the Australian government has learned some lessons,” Ms. Gillard said at a news conference in Canberra, the capital. “The Australian people have sent us a message about needless partisanship and bickering.”

In a dramatic piece of political theater earlier in the day, lawmakers Rob Oakeshott and Tony Windsor told a room packed with reporters that they would support Ms. Gillard’s government, giving her Labor party a one-vote majority of 76 in the 150-seat House of Representatives.

The announcements by Mr. Windsor and Mr. Oakeshott came after a third independent legislator, Bob Katter, earlier in the day threw his support behind the opposition conservative leader, Tony Abbott.