Security forces mounted the biggest manhunt in Northern Ireland's history today, searching for 21 Irish Republican Army guerrillas still at large after Sunday's mass prison break.

After thick early morning fog had lifted, police and British Army troops crisscrossed the countryside in helicopters. Ground units blockaded dozens of roads, patrolled house-to-house, and scoured farm areas using antiterrorist dog teams.

But the escapees, many of them convicted murderers, had disappeared into widely scattered IRA hide-outs or were thought to be headed for the 300-mile border with the Irish Republic. By nightfall, only two prisoners had been recaptured today, in addition to 15 who were rounded up within hours of Sunday's escape from the top-security Maze prison outside Belfast.

Four convicts who were captured were hiding underwater in the River Lagan, using reeds to breathe, Associated Press reported, quoting police. A Belfast police spokesman said the search of Roman Catholic strongholds uncovered 2,000 pounds of explosives hidden in a quarry outside Cookstown, southwest of Belfast.

The spectacular escape by 38 armed IRA guerrillas, who overpowered unarmed guards and outmaneuvered security systems, stunned British officials. In Ottawa, at the start of a North American trip, Prime Minister Margaret Thatcher said the incident is "very serious, the gravest in our prison history."

"There must be a very deep inquiry into everything that happened," she said, "but first everything is being done to recapture those who escaped."

Using guns and knives apparently smuggled into the Maze, the prisoners killed one guard and wounded six others in battling their way out. The BBC reported tonight that the food truck hijacked for the escape went through five security gates before it was blocked by the car of the guard who was killed in the struggle that followed.

It was also reported that the prison's main gate was open, letting the men escape on foot after abandoning their truck. Half of the guards were said to be taking a rest period or changing shifts when the breakout began, at about 4 p.m.

While praising the courage of the slain guard and others who were injured, Northern Ireland Secretary James Prior ordered a "rigorous and searching" probe into the multiple failures of prison procedures and equipment. The investigation was begun immediately by Britain's chief inspector of prisons, Sir James Hennessy.

Prior said all 127 prisoners in the H-7 block from which the convicts had escaped had IRA backgrounds and at least 18 of the escapees were murderers, some serving more than one charge and serving life sentences.

"Prison officers are doing their jobs valiantly," he said, "but they have charge of a group of utterly ruthless and determined men out to cause all the trouble they can."

There is no doubt that severe damage has been done to the government's efforts to suppress the IRA. Largely through a successful drive to recruit informers--known as "supergrasses"--inside both IRA and Protestant paramilitary organizations, hundreds of people have been arrested over the past 18 months on terrorism charges.

As a result, the level of violence in Northern Ireland had dropped sharply. Murders have declined from 97 in 1982 to 43 so far this year. Just last week, James Molyneaux, head of the official Unionist Party was quoted as saying that police could be on the verge, at last, of breaking "the terrorist grip" on the province.

Now, the IRA has scored a major propaganda gain and recovered some of its most notorious operatives.

Among those still at large is Brendan McFarlane, 29, who was the "commander" of the IRA men during the Maze hunger strikes in 1981, the last time the organization gained world attention with its prison activities. He was serving 25 years for killing five persons with a bomb in 1974.

Another escapee is Kevin Artt, 24, who was convicted last month on the testimony of a supergrass about the murder of an assistant governor at the prison. Artt was serving a life sentence. In all, 10 of the fugitives are convicted murderers.

Police and government spokesmen agreed today that the escapees are now likely to attempt some dramatic show of strength, perhaps by attacking the security forces. But any upsurge in trouble would likely be in the countryside where the men are hiding, according to police, rather than in Belfast where they can be more easily traced in the continuing dragnet.

Authorities in the Irish Republic were keeping a tight watch on the border today, including using a special task force recently established to spot suspected terrorists in and around the border area. Irish Prime Minister Garrett Fitzgerald said the republic would "not be a haven for terrorists."

Fugitives caught in the south would be tried there on escape charges and in connection with the murder of the guard, but would not be returned to the north.

The Maze prison, which has 850 inmates--250 serving life sentences--was intended to be Britain's most secure. It has 1,000 guards and the country's most elaborate security apparatus, including an Army contigent on the grounds.

But it also has by far the toughest prison population in Britain, which is why the inmates are concentrated in the supposedly escape-proof Maze rather than dispersed at more traditional institutions.