Two Irish government ministers warned here today that a continued hunger strike in British-ruled Northern Ireland could jeopardize British-Irish relations, including cooperation against terrorists operating along Ireland's border with Ulster.

Urging greater British flexibility in what they called a matter of "deadly urgency," the two representatives of new Irish Prime Minister Garret FitzGerald's government warned that the British government's handling of the hunger strike was having a "destabilizing effect on public opinion in the republic."

In Belfast today, according to news reports from the scene, the funeral procession of Joe McDonnell, the latest hunger striker to die, ended in violence when British security forces ambushed and shot members of the outlawed provisional Irish Republican Army who had fired a banned ceremonial fusillade over the basket. Several people were injured by plastic bullets fired by police and soldiers as rock-throwing youths among the several thousand mourners tried to help the IRA men escape.

Three hooded, uniformed IRA men, commanded by a fourth, had fired three volleys of rifle shots over the coffin as the procession moved through a Roman Catholic neighborhood in west Belfast. When the gunmen went into a house to shed their illegal weapons and uniforms, they were surprised by police and Army patrols.

Police said two gunmen were wounded, one escaped and the other was arrested and taken to a hospital where he was in serious condition. A woman in the house also was arrested.

When the exchange of fire, hundreds of youths broke away from the funeral procession to stone police and soldiers involved in the ambush. Mourners took cover in dorrways and threw themselves to the ground as the police and troops answered the attack with plastic bullets. Several people fell to the ground bleeding after being struck by them.

The Irish Cabinet ministers cited the increased tension in Northern Ireland caused by the hunger strike as among the reasons why the new Dublin government of Prime Minister FitzGerald was strongly urging greater British flexibility and urgency in trying to find a solution.

John Kelly, the Irish industry secretary who also is acting foreign minister, and james Dooge, the foreign minister-designate, met for two hours with Britain's Northern Ireland secretary, Humphrey Atkins, and Deputy Foreign Secretary Ian Gilmour.

Kelly told reporters that he had urged the British to rejoin the mediation effort of the Irish Commission for Justice and Peace of Ireland's Roman Catholic Bishops' Conference, which had appeared near a settlement this week until McDonnell died.

Kelly said he had told Atkins and Gilmour that the Irish government believed there was room for more British "accommodation" of changes in the prison regimen in Northern Ireland without abandoning the principle of refusing convicted terrorists special status as political prisoners, a principle he said the Irish government strongly supported.

"We tried to impress on them what we feel is really a deadly urgency," Kelly said. "We told them of the pressure the Dublin government must come under when it's trying to hold the line against violence and for a decent relationship with Britain while trying to settle this problem in which people can become so emotionally involved."

FitzGerald, and outspoken opponent of Irish nationalist terrorism and, as former foreign minister, involved in attempts to negotiate a solution to Northern Ireland's sectarian conflict, has actively tried to end the hunger strike since becoming prime minister June 30.

Elected by a three-vote majority in Ireland's Parliament, FitzGerald faces serious domestic economic problems as well as growing concern about instability across the border. Irish officials are concerned about the impact if the hunger striker whose fast is now most advanced, Kiernan Doherty, also dies.

Doherty, 25, who has refused food for 50 days and is in deteriorating condition in the Maze Prison hospital outside Belfast, was elected a member of the Irish Parliament in a constituency on the border with Ulster last month.

Another prisoner has taken McDonnell's place in the protest, so there are again eight hunger strikers whose deaths would come at about one-week intervals.