Copenhagen (dpa) - Danish voters went to the polls Thursday in a referendum that will decide how closely the country should align itself with the European Union on justice and home affairs.At stake is Denmark‘s membership in the cross-border crime fighting agency Europol, an issue that has come to the fore in the wake of the recent Paris terrorist attacks.In 1993, Brussels granted Denmark, an EU member since 1973, the ability to opt-out of EU matters related to justice and home affairs.But following the 2009 Lisbon treaty, more EU cooperation is being transferred to a supranational level in reforms also affecting Europol.Prime Minister Lars Lokke Rasmussen‘s right-leaning Liberals and the main Social Democrat opposition party are part of a five-party alliance that is pushing for a "yes" vote, arguing the reform is necessary.A "yes" vote would replace Denmark‘s current opt-out stance with a case-by-case opt-in system, similar to that used by Ireland and Britain."A ‘yes‘ is the safe choice. It ensures that we remain in Europol and can cooperate against crime," Rasmussen said."When we talk about cross-border crime like drug smuggling or human trafficking, we can‘t solve it alone in little Denmark," he said.Earlier, Rasmussen and other leading politicians went out on the streets of central Copenhagen and other cities to persuade undecided voters, and also answered questions on Facebook.Under the Danish constitution, a referendum must be held on any draft legislation that transfers powers to supranational authorities. Opinion polls in the run-up suggested a tight race with opponents of scrapping the opt-out in a slight lead.A win for the opt-in campaign would also see Denmark adopt 22 existing EU legal acts, ranging from family law to commercial law.Social Democrat leader Mette Frederiksen said after voting that what was at stake "was to ensure that our police have all the necessary tools to fight cross-border crime."If voters oppose a change, "we are out of Europol and we will have to see what kind of solution we can find," she added.Opponents to the change include the left-leaning Unity List and the eurosceptic Danish People‘s Party who oppose giving up sovereignty.The Danish People‘s Party, known for its tough immigration stance, argues that an opt-in would mean that Denmark will eventually be forced to adopt EU refugee policies, despite claims to the contrary from the yes-side."We urge voters to vote ‘no‘ since we give up our sovereignty on justice affairs if we say ‘yes,‘" said Danish People‘s Party leader Kristian Thulesen Dahl.About 4.1 million people are eligible to vote. At midday about 20 per cent had voted, news agency Ritzau projected. Polls close at 8 pm (1900 GMT).The Scandinavian country has also opted out of the euro currency union and the bloc‘s defence rules.