In Belgrade afterwards, he urged Serbs not to show hatred to Bosnian Muslims, adding he wanted friendly ties
Serbia's PM Aleksandar Vucic has been chased away by stone-throwing protesters from a ceremony marking the 20th anniversary of the Srebrenica massacre in Bosnia-Herzegovina.
About 8,000 Bosnian Muslim men and boys died at the hands of Bosnian Serb forces amid the break-up of Yugoslavia.
Serbia backed the Bosnian Serbs and Mr Vucic had been praised for attending.
In Belgrade afterwards, he urged Serbs not to show hatred to Bosnian Muslims, adding he wanted friendly ties.
The Bosnian War saw Bosnian Serb forces, backed by Serbia, fighting the Muslim-led Bosnian government.
In July 1995, thousands seeking shelter in what was supposed to be a UN refuge in Srebrenica were shot dead. It was Europe's worst atrocity since World War Two.
Mr Vucic is a former radical Serb nationalist who served under Serbian leader Slobodan Milosevic in the late 1990s.
He is now a pro-Western politician seeking to steer Serbia into the European Union. His government managed to secure support from its ally Russia on Wednesday to veto a UN resolution calling the events in Srebrenica a genocide.
Upon arriving in Srebrenica, he published an open letter saying which did not use the word genocide but said: "Serbia clearly and unambiguously condemns this horrible crime and is disgusted with all those who took part in it and will continue to bring them to justice."
A funeral service for more than 100 victims whose remains were recently identified using DNA analysis was also held on Saturday.
Attending the ceremonies, Bill Clinton, the US president at the time, apologised that it had taken so long to end the war, adding: "I never want to see another killing field like this."
At the scene: Guy Delauney, BBC News, Potocari, Srebrenica
The commemoration provided a perfect illustration of just how difficult reconciliation can be - in Bosnia and across the region.
Tens of thousands of people came to pay their respects to the victims of Srebrenica and show their solidarity with the people of this much-diminished town. They heard international dignitaries speak of the horror of what had occurred here and how it must never be repeated.
Then former US President Bill Clinton made a specific point of praising the courage of Serbian Prime Minister Aleksandar Vucic for turning up in the face of hostility from many ethnic-Bosniaks. They are angry that while Serbia has condemned the massacre, it has never used the word genocide to describe what happened.
Sadly, but predictably, Mr Vucic was loudly jeered by many in the crowd. Some even threw objects as he paid his respects in the cemetery. The imam reminded the crowd that it was time to pray. But the anger here remains.