In a renewal of violence following their failure to disrupt Queen Elizabeth II's visit to Northern Ireland, guerrillas of the Irish Republican Army yesterday killed a British marine and wounded three other soldiers.

The violence began with a guerrilla bomb attack on a British Army foot patrol in which two troopers were wounded. As troops flooded into the area, gunmen opened fire. They fatally wounded the marine and hit another in the chest.

The ambush came on the eighth anniversary of the eruption of sectarian strife between Protestants and Roman Catholics in Northern Ireland and only hours after the queen had set sail from Northern Ireland in the royal yacht Britannia for a vacation cruise off western Scotland.

The IRA had pledged to disrupt Queen Elizabeth's first visit to Northern Ireland in 11 years and make it "a day to remember." But her tour Wednesday and yesterday produced less violence than during a normal two-day period in the province. During her visit of the area, the queen was protected by a 32,000-man security network.

Five hours after the queen's departure a bomb exploded on the New University of Ulster campus at Coleraine, where yesterday the queen had met local dignitaries and walked through a youth pageant staged by 1,800 children. Police speculated that only a slip-up by an IRA bomb technician prevented the two-pound bomb from going off while the queen was touring the university buildings.

"They've got egg all over their faces," a security official said.

About a half hour before the queen's arrival at Coleraine, IRA provisionals issued a statement saying that security on the campus, had been breached and warning all members of the public to leave the area. British security officials decided to ignore the warning, and the visit went ahead.

The Provisionals used a device that could gave a delay of several days or even weeks between the planting of a bomb and its explosion. They have never before used so complex a system, and thus may have been unfamiliar with the sophisticated timing equipment.

Local police said that it was the failure of this bomb to operate according to schedule that triggered the attacks on British troops. The ambushes, said one police spokesman, were "a pathetic attempt to save some face."

Some police sources said they believed the IRA planted the bomb only after the queen had left the university campus.

The IRA ambushes took place in Belfast's Turf Lodge district, a stronghold of the IRA's Provisional Wing. Gunfire was heard in the Roman Catholic for some time, and a military spokesman reported gun battles between troops and snipers.

The latest fatality among the 1,774 persons who have died in the Northern Ireland fighting was a 19-year-old marine, who died in a hospital shortly after he was shot in the chest by a sniper. Another soldier was slightly hurt by a sniper's shot fired through the window of the patrol vehicle in which he was riding.

Two other soldiers were wounded when a blast bomb was thrown into their vehicle. The IRA immediatley claimed responsibility for the attacks, as it did for the killing of a soldier on the day the queen arrived and for the shooting and critical wounding of a major in a separate incident.