Diego Cortea Asencio, 48, was the right man with the right bag of tricks in the right place that February afternoon in Bogota when a diplomatic revel was cut short by gun-toting guerrillas.

In another capital, terrorist might have netted one of those ineffectual envoys who have gained their posts as a political reward and remain ignorant of their host country's speech and culture.

Instead, springing their trap just as Asencio headed for the door to leave, they snared themselves a wily, self-possessed, take-charge kind of guy, a disarmingly unstuffy career foreign service officer who speaks their language like a native and was steeped in their culture and politics.

Asencio said this week that he believes his ability to communicate with his captors on various levels was crucial in saving his life.

He had learned Freudian psychology during a State Department stint in Mexico, where his job included saving an unusually high volume of visiting American "maniacs," particularly schizophrenics, from jails down there. He had honed his negotiating skills in crusade to win money and official support for a fight against Colombia's drug "mafia," a much better-heeled and more violent crowd, as outlaws go, than the leftist urban guerrillas who nabbed him.

Even his circumstances of birth provided a tactical weapon against his captors, in their lengthy political debates. As the son of a Spanish-born laborer whose last job was a painter in a shipyard in Newwar, N.J., Asencio laughs, "I told them they are the bourgeoislie and I am the worker's son."

Asencio said, "I thought it important to make friends with them and make it more difficult for them to kill us . . . and also perhaps to create some doubts in their minds" about their ideology.

These debates took place in the run-down old Dominican Embassy in the Colombian capital, which Asencio said had a leaky roof, rotting floors, few toilets and no hot water.

He divided his 15 captors (one had been killed in the takeover) into three categories: "Some rather mean machines," who were older, had been indoctrinated and trained and were not very flexible in their thinking; "interesting and attractive" young, idealistic students, "searching, and more malleable"; and finally the adventurers, who if they weren't guerrillas "might be out holding up a bank or something."

Asencio and two other hostage-ambassadors from Mexico and Brazil joined forces to develop a rapport with their young, publicity-conscious captors during the 61-day standoff and, offering their services as expert consultants, managed to help write the terms of their own release. While they were determinedly active, mentally and physically, they reported, other hostages became "passive" vegetated and withered.

In a rare and dramatic happy ending, Asencio and 15 other hostages were set free last Sunday in Havana, where Fidel Castro had agreed to give their captors asylum. President Carter has hailed Asencio as "a real hero." t

Now that he's safely "out of hock," as he puts it, Asencio looks on the affair with something of a chemical researcher's clinical thrill of discovery after a flashy lab explosion: "It was a fascinating experience. I cherish it in many ways. I wouldn't want to repeat it, but you know, how often do you have an opportunity to live with guys like that for 61 days and see them function?"

The portly, bearded ambassador sat ina borrowed State Department office on Wednesday and reflected patiently -- as he had been doing since his return for friends, family and debriefers -- on what had happened to him in Bogota, and his widely admired response to it.A monumental surprise, he said, "in a career built on surprises."

"I'd like to write a book about it, but these ginks at the State Department tell me I can't make any money on it." He smiled thinly at a nearby "gink" and added, "So I've got the lawyers looking into that to see if it's true."

He kept a diary throughout the incident, he said. But "there are a lot of things that happened that I haven't said publicly, . . . For political reasons, for a number of reasons. Some of it is something that should only be for official purposes."

The concensus among his colleagues was that the whole thing couldn't have happened to a nicer guy. "As soon as I heard he'd been taken, I said to myself, I bet he's already trying to tell them how to run things in there, he's so gregarious," said one high-ranking State Department official who has worked with Asencio.

His wife of 26 years, Nancy, talked to him almost daily by phone through-out much of his imprisonment. The calls wre monitored by the guerrillas, so their conversation was limited. But, she said, "After 26 years, I think I had a pretty good thermometer [on his emotions]. the only emotion I felt was tension."

Nancy Asencio got up at dawn most mornings to cook for the people inside the embassy -- hostages and captors alike -- a total of 80 people at one point. "Once I made 10 Spanish omelettes, 12 eggs each. They keep nicely unrefrigerated." (Refrieration was just one of the many things lacking in the dilapidated old mansion.)

She also sent in a case of Wet Ones moisturized towels, she said, to make up for the lack of bathroom facilities, and she tried to rpovide a joke and a bit of good news to tell her husband each day. His secretary's job was to cut out crossword puzzles to send to him. "He can do the New York Times puzzle in a few minutes," Nancy said. "We had to send him 80 at a time."

During the early hours of the seizure, Asencio said, he felt stark fear and rage. But then, as he lay against the floor under the rain of bullets, he drew on his Catholic faith: "I managed to achieve the most perfect and sincere act of contrition of my career. And I found that it helped . . .And so when they sort of pulled me over to the door [as a shield] and told me to shout for a cease-fire I, perhaps to my surprise, found that I was able to stand there with some equanimity despite the fact that bullets were still coming through [I yelled] Stop firing!" period of lying on the floor, frightened and the walk to the exposed doorway when, "having resolved what I had to resolve internally, I wasn't frightened

These days the only guns he hears are the ceremonial howitzers booming a hero's salute against the background of military band music. But none of this acclaim and pomp will change him, Asencio says flatly.

"I thought I was pretty hot stuff before it happened. So I don't think there'll be any effect, you know." He laughed. "There's nothing wrong with my ego. It's nice [all the attention], but I don't elbow people out of the way now, or require curtsies."

The tribute from his friends and coworkers when they assembled in the State Department lobby on Tuesday, however brought him close to tears, he said.

Asencio's international sensibilities were tempered in the melting pot of Newark -- where, he said, his high school yearbook read like the roster of the United Nations.

Asencio, a naturalized U.S. citizen, was born in Spain but remained there only six months, while his mother recovered for an illness. His father had already settled in New Jersey.

"As a boy, he was "an omnivorous reader," he recalled, and always interested in politics. And his father insisted that he learn Spanish as well as English. (He now also speaks Portuguese.) This background, and the international mix of Newark, "made me a cultural relativist" at an early age, he said.

His father died and left some insurance money, and his mother went to work as a seamstress. She lived frugally, saved her money, and was perfectly happy to spend it all to send her son to college. . . .But it wasn't easy," Nancy Asencio said.

So Diego Asencio went off to get his basic foreign service training at Georgetown University in the early '50s, "when M Street was a hillbilly heaven." During those years, he had his first beer and first became interested in "organized" religion. He was confirmed as a Catholic here, he said, "at St. Matt's."

What he did not get was any schooling in how to deal with terrorists. "No, tut, tut. That was back when diplomacy was fun," he said.

After graduation, while he was waiting to be called up by the foreign service, he did time as an insurance underwriter at Newark Prudential. "The atmosphere was just exactly like the movie -- Jack Lemmon in "The Apartment,'" he chuckled, shaking his head.

Then came the Army from 1955 to 1957, where he served in personnel.

His long-awaited first foreign service assignment was, to his disappointmen at Washington headquarters, in a stuffy office at the World War i barracks that used to grace the mall behind the Smithsonian, he said with a grimace. To help pass the time, he even tried a year of law school, but "it was boring. I couldn't abide the case study method."

Ultimately his career took him, Nancy and their five children to Mexico, Portugal, Panama, Venezuela and Brazil. He was almost assigned in late 1977 to Cuba, until he reminded the brass that his wife was a native of pre-Castro Cuba. He was sent to Colombia instead.

His first foreign assignment in Mexico, he said, was the end of innocence. He was one of four U.S. officers in the Special Protecton and Welfare office. With the aid of three Mexican employes, they were to handle every kind of trouble Americans got into in Mexico. That was about a thousand cases a month. Asencio recalled, from some rather colorful murders to bounced checks and confiscated autos.

This period gave the young diplomat his first glimpse of jails, courts, violent death and a range of other eye-openers, he said. "I learned how get along with cops, doctors, judges, and other stange people."

"I got to know my first psychiatrist. We had an unusually large number of maniacs coming to Mexico. Schizophrenics, particularly, love to travel. They think they're getting away from their troubles. . . Some were quite violent.

"I would bring my friend [a psychiatrist] in to lecture the troops. And we became rather expert. Someone would walk in and twitch and we'd be able to diagnose them almost immediately."

Asencio also worked out a deal with some young "ambulance chasers," as he put it, to spring Americans out of Mexican jails during the crucial first 72 hours after their arrest. He gave signal beepers to his team of young jailhouse lawyers, and whenever an American got busted, he'd send them running to the precinct station. "During my three and a half years in Mexico -- "an admittedly simpler time than now,d" he said, "I did not have one [American] indictment."

It was in Panama tht he gained, as he put it, "my first undeserved reputation for courage." During the flag riots of 1964, with mobs in the streets, bullets flying, a couple dozen killed and hundreds wounded, Asencio recalled, he had cashed his paycheck and left the money in his "in box" at the office.

"We were afraid they were going to incinerate the papers in the office. . . So I dashed through the mob -- to save my money. And everybody said, "What guts!'"a

At the time of his capture, Asencio was in charge of disbursing some $16 million in U.S. tax dollars, approved by Congress, to Colombia's army, navy, air force and police, with the support of the country's president.

Asencio had been outspoken on the subject, praising Turbay's support for the fight. He told a reporter last January that the Colombian government, one of the few democracies in South America, was being "corrupte to the point of political instability [by the drug trade] while a 'civilized' people [Americans] argue about the harmlessness -- even chicness -- of its soaring rate of drug consumption. How terribly ironic."

Now, he said, the money and the project have been cut off.

All during his captivity, when his wife Nancy, would ask how he was, he would respond in Spanish, "Like an oak." It became a continuing thing with them, Nancy said, signifying the popular song about another sort of homecoming. "Tie a Yellow Ribbon Round the Old Oak Tree."

"When he landed at Homestead [Air Force Florida, after his rlease in Havana]," she said, "the base commander's wife had given me a yellow ribbon. I put that, and a gold cross and chain, around his neck.

"When we got back home with my sisters, he said, 'I love you all, but I'm going to take a hot bath.' And that ws the first thing he did."

What next for Asencio? A brief vacation and then a new post yet to be determined. He reportedly has been offered several assignments.

He also faces a confrontation with a more mundane sort of reality:

"I'd prefer to go back oversea, principally because I have five children in school," including a son at West Point, he said. Although Washington is his favorite city, he added, "I can't afford to live here."