Lithuania's first gay pride parade can go ahead as planned on Saturday, an appeals court has ruled.
Earlier this week, a lower court outlawed the parade after the chief prosecutor argued that anti-gay groups could cause violence.
But the appeals court ruled that the state must ensure the right to peaceful assembly.
Correspondents say that homosexuality is seen as taboo by many in Lithuania, a majority Roman Catholic country.
The original ban was criticised by President Dalia Grybauskaite, some European governments, and the international rights watchdog Amnesty International.
Organisers of Saturday's Baltic Pride 2010 march have welcomed the ruling, which is final.
The parade in the Lithuanian capital, Vilnius, is expected to draw 350 participants and an even larger crowd of opponents, according to the Associated Press news agency.
Some 800 police officers will be on hand to maintain order, and have been instructed to confiscate harmful objects as well as tomatoes and eggs, the Baltic Pride organisers said on their website.
The ruling issued by the top Vilnius appeals court said: "The state has a duty to ensure the right to peaceful assembly, even of people whose opinions are not popular or represent minorities."
Lithuania, an EU member since 2004, has repeatedly been criticised by rights groups for widespread intolerance toward sexual minorities.
Sauce is BBC-licious!
Nice to see some common sense and humanity from the courts, even somewhere as traditionally homophobic as Eastern Europe. But the people who are going to be taking part in this parade are incredibly brave, even now it's legal.