BELFAST, Northern Ireland (AP) _ A Protestant gunman who attacked a funeral for IRA guerrillas last week was charged Tuesday with murder in the killings of six Roman Catholics, including three who died in the cemetery onslaught.

Michael Stone, 33, was taken to court under heavy guard and police testimony said Stone told officers his ''military operation'' was in retaliation for attacks by the outlawed Irish Republican Army.

Police quoted Stone as telling interrogators, ''I alone carried out this military operation as a retaliatory strike against Provisional Sinn Fein, the IRA, in response to the slaughter of innocents at La Mon, Darkley, Brighton and Enniskillen,'' referring to some IRA attacks in the last decade.

He stood silently in the dock through the 10-minute hearing while a police officer also testified that Stone told detectives: ''I would state I am a dedicated free-lance Loyalist (Protestant) paramilitary. No surrender.''

Stone was charged with killing three people March 16 at a funeral in Milltown for three IRA members shot by British security forces in Gibraltar. An alleged accomplice is being held by police. He has not been identified.

Stone also is accused of killing three other Catholics shot in sniper attacks between November 1984 and May 1987. The victims were a milkman, a bread delivery man and a carpenter, none with known IRA links.

An outlawed Protestant guerrilla group, the Ulster Freedom Fighters, claimed responsibility for each of those murders.

In Catholic west Belfast, where British authorities ordered a ''massive murder investigation'' after the killing of two British soldiers during another IRA funeral on Saturday, police erected road blocks at main roads into the ghetto.

British soldiers, rifles in hand, patrolled the streets.

Police sources say up to 30 suspects have been identified from an army video and TV footage of Saturday's rampage.

A funeral mob dragged the soldiers from their unmarked car, stripped and beat them. They were shot out of sight of the cameras in a soccer stadium.

In London, Prime Minister Margaret Thatcher attacked Britain's two television networks, the British Broadcasting Corp. and Independent Television News, for refusing to give police their unscreened film of the horrifying scenes. The networks said handing over the film would endanger the lives of their crews.

''Either one is on the side of justice in this matter or on the side of terrorism,'' Mrs. Thatcher said in the House of Commons as her rank-and-file supporters clamored for the government to seek a court order to force the networks to yield their film.

Government sources said lawyers were considering legal moves.

The two soldiers, whom the army has acknowledged should not have been in the area, were attacked after they drove up to the funeral cortege.

Some of the tense crowd apparently suspected another Protestant assault following the gun and grenade attack at Milltown Catholic cemetery.

In Milltown, Stone, still hurling hand grenades and firing until his gun jammed, was captured by enraged mourners at the funeral and beaten before police arrived.

The guerrilla attacks Stone cited in his statement to police dated back to Feb. 17, 1978, when bombers killed 11 people at a restaurant outside Belfast.

At Darkley, a village in County Armagh near the border with the Irish Republic, gunmen fired on the congregation in a Protestant chapel on Nov. 20, 1983, killing eight people.

In the Brighton bombing on Oct. 12, 1984, the IRA blew up the hotel where Mrs. Thatcher was staying during a Conservative Party conference. She escaped injury, but five people were killed and 30 injured.

At Enniskillen, in Northern Ireland's County Fermanagh, the IRA bombed a service for war dead on November 8, killing 11 people.

The victims were among at least 2,639 people killed in sectarian violence in Protestant-dominated Northern Ireland since 1969. The IRA is fighting to end British rule and unite the province with the Catholic Republic of Ireland under a lefist administration.

In Londonderry, Northern Ireland's second-largest city, police said several people were held for questioning about the murder on Monday of a policeman at a checkpoint. The IRA has claimed responsibility.

Earlier Tuesday, police sealed off the main shopping precinct in Londonderry after discovering a 25-pound homemade bomb. Police detonated the device in a controlled explosion.