(CNN) -- Indonesia's ruling party gathered the most votes in the country's first direct legislative elections, voting officials said Sunday.
President Yudhoyono's party won the most votes in the election, setting him up for a second term.
President Susilo Bambang Yudhoyono's Democratic Party received 20.9 percent of the vote, the Indonesian election commission said. The win makes it the first to reach the 20 percent of parliament seats needed to nominate a presidential candidate on its own.
Parties that did not make the cut have been trying to form coalitions and presidential tickets.
Polls and analysts favor Yudhoyono, who is known as "Mr. Clean," because of his anti-corruption efforts. He also has gained popularity for his handling of the 2004 tsunami recovery and the country's battle against terrorism.
Golkar, the party once largely associated with former dictator Suharto, came in second, with 14.5 percent. The opposition party PDI-P, led by former President Megawati Sukarnoputri, was third.
Sukarnoputri is running for the nation's top post on July 8. Yudhoyono's vice president, Jusuf Kalla, also has announced his presidential bid.
Indonesian voters chose from nearly 12,000 candidates from 38 political parties in the April 9 legislative election.
Voting was largely peaceful, but the country's Papua province was hit by violence on election day. About 80 separatist rebels, armed with machetes and firearms, attacked a police station and burned part of a university, police said.
Four students were killed in the violence, which took place in Wamena and Jayapura, according to the deputy editor of the Suara Perempuan newspaper in Papua.
Voting was postponed by a day for hundreds of Papuans, but the General Election Commission blamed "logistics failure" for the delay, according to the Jakarta Post.
Despite allegations of fraud and irregularities, the official count mirrors most of the sanctioned quick counts.