By Stephen Kalin and Isabel Coles

BAGHDAD/ERBIL, Iraq (Reuters) - About 40,000 residents of Falluja, Islamic State's besieged stronghold near Baghdad, have fled in the last three weeks, but a similar number are trapped despite the Iraqi army's attempts to secure escape routes for them, officials said on Tuesday.

Officials in Anbar province, where Falluja is located, said Islamic State was tightening control over civilian movement in the center where the United Nations and a provincial official estimate around 40,000 civilians are stuck with little food or water.

The group has used residents as human shields to slow the troops' advance and thwart the air campaign backing them.

By midday on Tuesday fewer than 1,000 people had fled Falluja through a southwestern route secured by the military on Sunday at al-Salam Junction, a Norwegian aid group said, down from 4,000 and 3,300 on each of the previous two days.

The United Nations recently put the total population at 90,000 people, a fraction of its size before IS took over.

The army, counter-terrorism forces and Shi'ite Muslim paramilitary fighters backed by air strikes from a U.S.-led coalition launched a major operation last month to retake the mainly Sunni city, an hour's drive from Baghdad.

But Prime Minister Haider al-Abadi slowed the advance to protect civilians amid fears of sectarian violence, and Iraqi forces have made only piecemeal gains in recent days as they try to reach the city center.

Most of those displaced on Tuesday came from the outskirts, according to the Norwegian Refugee Council (NRC), which is providing aid to escapees at nearby camps who join around four million others displaced across the country.

Islamic State has alternately attacked civilians trying to leave and forced them to pay an exit tax of more than $100 per person, said Karl Schembri, an NRC spokesman.

"The journey is still full of risks and extremely unsafe," he said in an email.

"IN TERRIBLE TROUBLE"

Falih al-Essawi, deputy head of the Anbar provincial council, said the militants had threatened to shoot fleeing families.

Aid groups providing food, water and other supplies to escapees do not have access to the city itself, which was besieged by government forces for around six months before the current advance began, prompting the United Nations and rights groups to warn about an imminent humanitarian crisis.

"The fighting has now gone on for nearly three weeks. Those people were in trouble before the operation began and we have to now assume that they are in terrible trouble," Lise Grande, the U.N. humanitarian coordinator for Iraq, said in a telephone interview.

Iraq said on Monday it had made arrests as it investigates allegations that Shi'ite militiamen helping the army retake Falluja had executed dozens of Sunni Muslim men fleeing the city held by Islamic State.

The participation of militias in the battle of Falluja, just west of Baghdad, alongside the Iraqi army had already raised fears of sectarian killings.

Falluja is a historic bastion of the Sunni insurgency against U.S. forces that toppled Saddam Hussein, a Sunni, in 2003, and the Shi'ite-led governments that followed.

The push on Falluja comes at the same time as other enemies of Islamic State launched major offensives on other fronts, including a push by U.S.-backed forces against the city of Manbij in northern Syria.

They amount to the most sustained pressure on the militants since they proclaimed their caliphate in 2014.

NORTHERN OFFENSIVE

While it kept focus on Falluja, the Iraqi army also pressed on with an advance south of Mosul, Islamic State's de facto capital seized in 2014 along with a third of Iraq's territory.

Backed by coalition airstrikes and artillery, Iraqi forces retook the hilltop village of Nasr on the eastern bank of the river Tigris, about 275 kilometers (170 miles) north of Baghdad, a military statement said. The army had recaptured Nasr two months ago but retreated a day later, drawing criticisms that it was unprepared.

The army was still pushing to retake another village in the Haj Ali area, which it pushed into at the weekend.

Across the river is the Islamic State hub of Qayara, where there is an airfield that could serve as a staging ground for the future offensive on Mosul, about 60 kilometers further north.

"The bridges are ready," said an Iraqi officer involved in the operation. "When we occupy the Qayara base, Mosul will be within reach".

The officer said Islamic State had not mounted a strong defense of Haj Ali, and that more than 20 fighters had been killed, while others fled across the river. "Our intelligence says that they are collapsing," he said.

Elite Iraqi forces are also preparing to advance up the Tigris river valley towards Qayara from the south, military officials said on Tuesday.

If successful, the move would isolate the militant-held districts of Hawija and Shirqat from the rest of the territory Islamic State controls to the west.

(Additional reporting by Ahmed Rasheed and Saif Hameed, editing by Peter Millership)