By Thomas Buch-Andersen
BBC News, Copenhagen
Immigration has become the central battleground in the Danish parliamentary election, which takes place on Tuesday.
Mr Fogh Rasmussen is tipped to win the election - and a third term
Denmark's relations with the Muslim world reached crisis point in 2005 over a Danish newspaper's publication of Prophet Muhammad cartoons.
The leader of the opposition Social Democrats, Helle Thorning-Schmidt, proposes to relax restrictions on asylum seekers.
The centre-right Prime Minister, Anders Fogh Rasmussen, warns that such a move could turn Denmark into "a magnet for refugees".
Strict immigration policies have been at the heart of his government's programme since 2001.
Mrs Thorning-Schmidt, daughter-in-law of former British Labour Party leader Neil Kinnock, wants to give a group of some 500 Iraqi failed asylum seekers permission to live and work outside their refugee camps until Iraq becomes safe enough for them to return. She says Denmark has a special responsibility to help the Iraqis because of Denmark's role in the Iraq conflict.
Although most Danes want to ease restrictions on asylum seekers, Mrs Thorning-Schmidt still looks unlikely to win.
Her party, like Mr Fogh Rasmussen's, would need the support of the centre-right New Alliance Party to form a government - but it is thought to be leaning towards the incumbent prime minister.
New Alliance was founded in May this year by a popular immigrant politician, Syrian-born Naser Khader.
He came to prominence in 2005 when he promoted reconciliation and religious tolerance to defuse the row over the Prophet Muhammad cartoons. Anti-cartoon protests across the Muslim world left more than 100 dead.
Syrian-born Naser Khader has shot to prominence in Denmark
Mr Khader, who has "democracy" tattooed across his right arm, remains a cultural Muslim.
His party wants to reform Denmark's tax system. The country has one of the highest tax rates in the world - up to 68% - and New Alliance is keen to reduce it. The party also wants better conditions for asylum seekers.
Rival Muslim candidate
Mr Khader contrasts with the other prominent Muslim politician in the race, Asmaa Abdol-Hamid of the left-wing Unity List.
Mrs Abdol-Hamid - who wears a headscarf - has upset many by refusing to shake hands with men in public for religious reasons.
At the other end of the political spectrum is the anti-immigration Danish People's Party (DPP). The DPP has been the driving force behind the tightening of Denmark's immigration laws in recent years.
It has angered the Palestinian Al-Aqsa Martyrs Brigade in Gaza by using an image of the Prophet Muhammad on one of its election posters, in direct reference to the cartoon row.
The image was accompanied by the text "Freedom of speech is Danish, censorship is not".
No TV debate
In an interview with Jyllandsposten, the newspaper that originally published the cartoons, a spokesman for the Al-Aqsa Martyrs Brigade, Khaled al-Jabbari, said "this party is dealing with the blood of the Danish people. That is dangerous."
"The DPP will not only be an enemy of the Al-Aqsa Brigade. They will be an enemy of many Muslims," he added.
Mrs Thorning-Schmidt wants more welfare instead of tax cuts
DPP leader Pia Kjaersgaard said "this is insane - there is absolutely no way we will bow to a terror organisation".
"We did not draw the image. It is a 400-year-old drawing of Muhammad that we are using to symbolise freedom of speech."
Danish Foreign Minister Per Stig Moeller said "Al-Aqsa Brigade is a terror organisation that should not dictate the political life of Denmark".
Although he is the favourite to win the election, Mr Fogh Rasmussen has been reluctant to meet Mrs Thorning-Schmidt at live debates. He says such debates are too populist and distract from real politics.
However, some commentators suggest that his real concern is that Mrs Thorning-Schmidt, the first female prime ministerial candidate in Denmark, has a better connection with the audience. "
Whoever wins, immigration will remain high up Denmark's political agenda.