The presidents of Ukraine and Poland have paid tribute to countrymen who died fighting each other 85 years ago.
Thousands of Poles and Ukrainians attended the ceremony
Ukraine's Viktor Yushchenko and his Polish counterpart Aleksander Kwasniewski were attending ceremonies to remember those killed in 1918-1920.
A memorial to Ukrainians killed fighting Poland was unveiled before a Polish war cemetery in Lviv, now part of Ukrainian territory, was reopened.
Since the end of the USSR, relations between the neighbours have got better.
The Lviv graveyard, built when the city was part of Poland, had always been a contentious issue, as it became a symbol of Polish victory in territory that was fought over for centuries.
The BBC's Helen Fawkes said ties improved significantly after many people in Poland backed the Ukrainian opposition protests of the Orange Revolution last year, which led to Mr Yushchenko becoming president.
More than 2,000 Polish soldiers are buried at the Lychakivske cemetery. Many of them died fighting Bolshevik and Ukrainian forces in the years following the Russian revolution of 1917.
More than 3,000 people attended the ceremony - which Mr Yushchenko praised as an act of reconciliation between the neighbouring countries.
"It is very important that the free Ukraine is now honouring slain Ukrainians together with a free Poland," he said.
"This cemetery holds the remains of former fellow students, schoolchildren, neighbours and relatives. Some of them [fought under] the Ukrainian trident, others under the Polish eagle. One people's defeat never was another people's victory.
"The fact that the two presidents visited the Lychakivske cemetery together shows that Ukraine and Poland are brave enough to look the past in the eye."
He said the main conclusion from history was that "there is no free Poland without a free Ukraine, and there is no free Ukraine without a free Poland".
Mr Kwasniewski said Ukraine and Poland should cherish the gift of freedom that both nations received amid the dissolution of the Soviet Union.
"Now we are building relations of dialogue and partnership," AP quoted him as saying.
Our correspondent says the official opening has been delayed for years due to disagreement over how to honour the Polish soldiers.
Following Ukraine's Orange Revolution last year, the two countries were able to come to a compromise. But a new row erupted this week.
Ukraine's parliament called for the service to be cancelled until the inscriptions on the graves were changed from Polish to Ukrainian.
Mr Yushchenko's office condemned the move. On Thursday, the resolution was annulled, allowing the ceremony to go ahead.