The party of East Timor's prime minister has won the parliamentary elections, but without an overall majority.

With all the ballots counted from Saturday's poll, the National Council of Timorese Resistance party, led by former rebel leader and current prime minister Xanana Gusmao, had just over 36 percent of the vote.

The results are expected to set up a prolonged period of negotiations to form a coalition government.

The United Nations praised the polls for being peaceful and orderly. The U.N. has said that it will withdraw its troops if the parliamentary polls went smoothly, following peaceful presidential elections in April.

East Timor gained independence from Indonesia in 2002 after three years of U.N. administration, which followed more than two decades of bloody guerrilla warfare during Indonesian rule.