The four-week-old hunger strike by seven imprisoned Irish nationalist terrorists in British-ruled Northern Ireland is causing great concern for the British government, which fears it will lead to a new surge of sectarian violence in the troubled province.

British officials say they cannot give in to demands that hundreds of convicted terrorists in Ulster be given special treatment as political prisoners. But they believe the hunger strikes are in danger of dying next month after six to eight weeks of consuming only water in their cells in the Maze Prison outside Belfast.

The British fear militant nationalists will use the prisoners' deaths to try to further polarize the minority Catholic and majority Protestant communities in Northern Ireland and win increased international support for their campaign of terror to force the British out of Ulster and reunite it with the adjoining predominantly Catholic Republic of Ireland.

Tensions already have increased in Northern Ireland since the hunger strike began Oct. 27. Surprisingly large numbers of young Catholics have joined in protest marches on behalf of the hunger strikes. Support also is being sought from Irish Catholics here and abroad.

The largest nationalist terrorist group, the Provisional Irish Republican Army, has reduced its attacks on British and Ulster security forces to concentrate on these efforts to gain support for the strikers. But the IRA has threatened a violent "campaign of retribution" if any of the prisoners dies.

The Ulster Defense Association, a Protestant paramilitary group that attacked Catholics during the worst violence of the 1970s, vowed last week to answer the IRA in kind. It warned in its magazine, Ulster, that the confrontation "will undoubtedly take the Ulster people to the brink of civil war."

British security officials have reportedly made emergency plans to send reinforcements for the British troops and Ulster police and reserves who have battled the terrorists since sectarian violence erupted more than a decade ago. Because of a reduction in violence and the increasing isolation of the terrorists before the hunger strike began, the British have been withdrawing about 1,500 troops this year, leaving about 11,000 to back up the Ulster constabulary.

The hunger strike, according to British officials, has made it much more difficult for Prime Minister Margaret Thatcher's government to negotiate with Ulster political leaders. Thatcher is trying to end the political impasse in the province by securing a limited home rule in which the Protestant majority and Catholic minority would share power under continuing British sovereignty.

Thatcher's secretary for Northern Ireland, Humphrey Atkins, reported last week that he was unable to come close to agreement among Ulster leaders on any of the complicated home-rule proposals offered recently by the government.

Atkins is now expected to explore alternatives, including a largely powerless elected advisory assembly that might be increased in power as agreement is reached among its members on how authority would be shared. But Ulster leaders remain deeply divided along sectarian lines on a political solution.

Ulster's Catholics want a guaranteed share of power in any provincial government and negotiations between the Republic of Ireland and Britain that could lay the ground for Irish unification. Protestants want unfettered majority rule and a continuing British guarantee that Ulster would never be forced into union with Ireland.

The hunger strike is an escalation of a so far unsuccessful four-year campaign by convicted nationalist terrorists to be treated as political prisoners rather than criminals. Britain had given convicted IRA terrorists special status from 1972 to 1976, putting them into prison camps like prisoners of war.

Of the nearly 2,000 convicted criminals in Ulster prisons, an estimated 1,600 have either Catholic or Protestant paramilitary connections. Less than 400 remain in the special-status prison camp at Long Kesh outside Belfast. Most of the rest, convicted after special status was rescinded, are now in the adjacent Maze Prison.

Several hundred have demanded special status. They also seek unlimited freedom within the prison and exemption from prison work, the right to wear their own civilian clothes and permission for normal visitor and mail privileges even if they do not observe prison rules. For four years they have refused to work and have dressed only in blankets. For two years, they have refused to use prison toilets and have smeared their cells with their excrement.

After this "dirty protest" failed to stir sufficient sympathy among Irish Catholics in Ulster and beyond, the hunger strike was started by seven volunteers, all convicted of violent crimes, including murder and attempted murder.

British policy forbids force feeding of hunger strikers in prisons. Atkins has warned that if the hunger strikers do not take food "they may well die" but "the government cannot compromise on the principle that is at stake here."

"There can be no political justification for murder or any other crime," Thatcher said last week. "The government will never concede political status to the hunger strikers, or to any others convicted of criminal offenses in the province."

The Provisional IRA and its sympathizers argue that the convicted terrorists are revolutionaries railroaded through Northern Ireland courts by judges only because the right to trial by jury has been suspended.

Shortly before the hunger strike began, and after pressure from international human-rights groups, British officials decided to let all prisoners in Ulster wear government-issued civilian clothes during work hours. Prisoners already were allowed to wear their own clothes at other times.

British officials also have restored normal privileges to prisoners who give up their protest, and have offered protesting prisoners outdoor exercise, books and newspapers, which the prisoners refuse.

In a campaign to counter IRA propaganda, Britain has begun publicly emphasizing these moves.

But the strike appears to be gaining sympathy for the convicted terrorists and hostility and suspicion toward the British among many Irish Catholics.