NICOSIA, Cyprus (AP) _ Iraq is massing troops and building a huge earthen barrier to trap rebels and dissident civilians in the swamps along its southern border with Iran, Iraqi opposition groups and Western sources say.

The reports came as a team of U.N. inspectors prepared Thursday to enter the marshlands to investigate allegations Saddam Hussein used chemical weapons there against Shiite Muslim rebels and residents who have long defied Baghdad.

Iraqi opposition groups based in Iran have alleged that chemical attacks were launched in September. On Thursday, Iran's official news agency, citing Iraqi dissidents in Iran, reported chemical attacks in southern Iraq in recent days, but there was no way to immediately confirm that account.

Baghdad, which used chemical weapons in its war with Iran and against Iraqi Kurdish rebels in the north, has denied using them in southern Iraq.

But after interviewing Shiite refugees in Iran, the U.N. team believes it has determined the location of a chemical strike, the United Nations said in a statement.

The use of chemical weapons would constitute a serious violation of the U.N. cease-fire resolution ending the 1991 Gulf War. Under the resolution, Iraq was to destroy all weapons of mass destruction, including chemical weapons.

The U.N. team was waiting in Bahrain for an equipment delivery, said Jan Fischer, regional chief for the U.N. Special Commission overseeing the dismantling of Iraq's weapons of mass destruction. Fischer said he didn't know when the team would leave for the swamplands.

Iran's Islamic Republic News Agency said victims of chemical attacks in recent days were being rounded up and ''kept in secret places'' inside Iraq.

The IRNA report, monitored in Nicosia, also said the Iraqi military was building huge embankments along the frontier with Iran and deploying large concentrations of troops to prevent marsh-dwellers and rebels from escaping.

For more than a year, Saddam has been waging a major campaign to eliminate the rebels and the ancient civilization of the marsh Arabs, known as Madan.

British filmmaker Michael Wood was in the marshes in September to make a documentary on the marsh-dwellers' plight.

''We saw the Iraqi army building a huge dike that runs for miles parallel to the Iranian border and several hundred yards inside Iraqi territory,'' he told The Associated Press in a recent interview.

''It seems to have only one purpose, and that is to stop the marsh Arabs getting out to safety,'' he said.

He also said the Iraqi army has been shelling the passages that people in the area use to leave the swamps.

Western relief workers in southwestern Iran also reported seeing Iraqi troops building a large earthen dike parallel to the border.

The swamp-dwellers represent one of the world's oldest cultures. Their aquatic way of life has remained largely unaltered for millennia because the marshes have been inacessible except by canoe or motor boat.

But now Saddam's army engineers are draining the swamps - ostensibly to turn them into farmland - and shelling the marsh Arab villages day and night.

The Madan population in the marshes has fallen from an estimated 700,000 in 1980 to about 200,000 after forced relocations and an exodus to Iran.

Laith Kubba of the Al-Khoei Foundation, a Shiite opposition group based in London, said construction of the border dike fits in with Saddam's campaign to wipe out the marsh Arabs and ''create a dead zone.''

''In the last year, we've seen more visible evidence of the plan itself,'' he told The Associated Press.