A Serbian court on Monday ordered the release of three police officers from Kosovo who were detained earlier this month as tensions escalated between the Balkan foes and following U.S. and European Union demands that they be set free.

A court in the central Serbian town of Kraljevo said it was releasing the police officers, who will be allowed to return to Kosovo. The court said in a statement that the three were charged with illegal possession of weapons and explosive devices, and that they will be allowed to remain free pending potential further proceedings.

It was not immediately clear when the policemen will be back in Kosovo. Fatmir Haxholli, who is Kosovo's representative in Serbia, posted on Facebook a photo of himself with the three officers and an inscription reading "Finally!" after the three apparently left the Serbian prison.

SERBIA'S PRESIDENT ANNOUNCES EARLY ELECTIONS AMID PROTESTS, TRAGIC SHOOTINGS

Serbia's chief negotiator with Kosovo, Petar Petkovic, said the proceedings against the policemen will continue. He said it was a court decision "and not a political one."

In Kosovo, officials insisted the three had been kidnapped and demanded that Serbia be held responsible for allegedly violating Kosovo's territory. President Vlosa Osmani thanked the United States for securing the policemen’s release "after the act of aggression that Serbia did in Kosovo."

Police car on fire

A Kosovar police car burns in Zvecan, Kosovo, on May 26, 2023. Three police officers from Kosovo were released after being detained. (AP Photo, File)

Prime Minister Albin Kurti tweeted that "we confirm that the 3 kidnapped police officers have been released. Even though we are joyous that they get to return to their families, this abduction consists of a serious human rights violation & must be reprimanded. The Serbian aggression must be held accountable."

SERBS MARCH ON BELGRADE IN DROVES AFTER BACK-TO-BACK MASS SHOOTINGS

The three were detained in mid-June. Serbia has said they had crossed into the country from Kosovo, while Kosovar authorities insisted they had been kidnapped inside Kosovo and transferred to a Serbian prison.

The dispute had increased tensions between the two countries that had flared into recent violent clashes in the Serb-majority north of Kosovo, stirring fears of a renewal of the 1998-99 conflict in Kosovo that left more than 10,000 people dead, mostly Kosovar Albanians.

The EU last week summoned the leaders of Kosovo and Serbia to Brussels in a bid to ease the tensions. The meeting produced no breakthrough as EU officials urged both sides to make an immediate effort to defuse the situation.

Serbia and its former province Kosovo have been at odds for decades, with Belgrade refusing to recognize Kosovo’s 2008 declaration of independence. Western efforts to resolve the crisis increased recently to avert possible instability in the Balkans as the war rages in Ukraine.

Tensions flared anew late last month, including with violent clashes, after Kosovo police seized local municipality buildings in northern Kosovo, where Serbs represent a majority, to install ethnic Albanian mayors who were elected in a local election in April after Serbs overwhelmingly boycotted the vote.

CLICK HERE TO GET THE FOX NEWS APP

Serbia has demanded that Kosovo police and the mayors pull out from the northern region bordering Serbia and that several ethnic Serbs, who had been detained in Kosovo in the past few weeks, be released. Belgrade has heightened army readiness, threatening a military intervention over alleged "torture" of ethnic Serbs in Kosovo.

In response to Kosovo's actions in taking over the municipal buildings, the United States canceled the country's participation in a U.S.-led military exercise and halted high-level visits to Pristina.

Washington and most EU states have recognized Kosovo's independencem while Russia and China have backed Belgrade's claim to the territory. Serbia lost control over Kosovo after NATO intervened in 1999 to stop the war, forcing Belgrade to end a brutal crackdown against separatist ethnic Albanians.