PODGORICA (Reuters) - Montenegro's opposition has called supporters into the streets to protest against President Filip Vujanovic's re-election and said it will take allegations of electoral fraud to the courts.

Although the post is largely ceremonial, the fact that the vote was extremely close has rattled Vujanovic's Democratic Party of Socialists (DPS), who have held power for more than two decades, and given the opposition Democratic Front momentum.

Vujanovic took 51.2 percent of the vote, according to official preliminary results. But the opposition alleges fraud and says its candidate, Miodrag Lekic, won, although the electoral commission has rejected his request for voting to be repeated in certain areas.

Democratic Front official Branko Radulovic said his party would hold a rally outside the president's office in Podgorica at midday (1000 GMT) on Saturday. He also said it would file a formal complaint against the result with the Constitutional Court.

But he dismissed concerns of unrest.

"We will maintain the utmost responsibility towards the situation facing Montenegro today and its future," he said.

The dispute threatens to divert attention from the reforms Montenegro needs to pursue through long talks on membership of the European Union.

The Adriatic state began accession negotiations with the EU in mid-2012, putting its 680,000 people next in line for membership behind fellow ex-Yugoslav republic Croatia, which joins the bloc on July 1.

Analysts say an economic slump triggered by falling foreign investment, and persistent allegations of cronyism and corruption, have eaten into the DPS's support. It returned to power in a parliamentary election in October last year, but without an outright majority.

(Reporting by Petar Komnenic; Writing by Matt Robinson; Editing by Kevin Liffey)