SANTA FE, N.M. (AP) _ Authorities recaptured a prison inmate who was making a getaway atop a truckload of construction material Thursday as a five-day search for five other escapees spread across the mountains and deserts.

Former Albuquerque police Officer Robert Earl Davis, one of seven men who escaped from the maximum-security wing at the Penitentiary of New Mexico on Saturday, was found hiding on top of a tractor-trailer rig.

Davis was wearing a light green sweatshirt, not prison-issued, and blue- green prison fatigue pants that had been scratched and torn as if from rough walking, authorities said.

''He was tired, hungry and thirsty,'' said Corrections Department spokesman Don Caviness. Davis was returned to the penitentiary late Thursday.

The driver of a truck trailing the one carrying Davis saw the escapee on top of the vehicle and signaled a passing state police officer. Authorities pulled over the truck near Belen, 85 miles south of Santa Fe, and took Davis into custody.

''Initially, he denied he was Davis,'' said Valencia County Sheriff's Capt. Ray Flores. Davis was positively identified at the Central New Mexico Correctional Facility in nearby Los Lunas.

Flores said the truckers had last stopped at a truck stop in Albuquerque, and apparently Davis climbed aboard there.

Valencia County Sheriff Lawrence Romero said Davis refused to give information on other escapees. State police Capt. John Denko said Davis, thought to have been a mastermind of the escape, did not struggle and was not armed.

Two escapees are convicted murderers and the others have a history of armed robberies and assaults on police. Davis, the second inmate to be recaptured, was serving 44 1/2 years for armed robbery, burglary, larceny, escape and other charges.

Although police were discouraging people from arming themselves, gun dealers reported a slight increase in the sale of guns and ammunition as the focus of the search expanded from the Santa Fe area to the rugged Capitan Mountains, 150 miles to the south.

A man thought to be Michael Romero, one of the inmates, broke into a house Wednesday in Willard and demanded a car. The only occupants were three children who ran for a nearby restaurant, and the intruder departed in a pickup truck with two other men.

The truck was reportedly spotted Wednesday night in a forested area near Capitan, a few miles from 10,083-foot Capitan Peak.

Deputies were visiting ranch houses in the area to look for the inmates and to warn residents, said Lincoln County Sheriff Don Samuels. He said his department was swamped with calls from alarmed residents Wednesday night.

Several residents of outlying areas moved in with friends or into motels in Santa Fe. A convenience store on the south side of Santa Fe shut down its graveyard shift until all the escapees were caught.

An earlier attack on a civilian occurred Tuesday, when a 19-year-old woman was attacked southeast of Santa Fe. Yvonne Garcia hid the two children she was baby-sitting under a bed before a man identified as escapee David Gallegos broke down the door and slashed her on the arm with a knife. The man fled when she fought with him and punched him in the face.

Denko said the search around Santa Fe is continuing but roadblocks are being scaled down. Caviness said some correctional officers were being pulled off the search to return to duty at the penitentiary, where guards have worked double shifts since the escape.

Police were making periodic checks on the home of Dr. Roger Miller because John M. Schmidt, one of the escapees, was serving time for breaking into the Santa Fe surgeon's home, clubbing him and holding his family for several hours before fleeing in his car.

Denko said guns in the hands of untrained civilians can be a recipe for disaster. People should ask, ''Can I use it if I have to? Will I pull the trigger? Will I hesitate?'' he said.

Bill Roney, owner of a Santa Fe gun shop, said he's sold a higher number than usual of firearms this week. ''And I've been very busy giving lessons. We have a firing range on the premises,'' he said.

Warden George Sullivan said Monday he had no doubt Davis and William Wayne Gilbert, convicted of killing four people in January 1980, engineered the escape. Torrance County authorities said the other men involved in the Willard break-in may have been James N. Kinslow, a triple murderer, and Gallegos.