For most of her life with Ernest Hemingway, from 1946 until his death in 1961, Mary Welsh Hemingway lived in Cuba. The author and his wife owned a country home, La Vigia, outside Havana.

This week, for the first time in 16 years, Mary Hemingway returned to La Vigia (Watchtower Farm) now a Cuban national museum. There is a Hemingway cult in Cuba, and Mary Hemingway was invited to the presidential palace to meet with Fidel Castro during her five-day visit here.

For Mary Hemingway, who is 69, coming back to La Vigia was an emotional experience. Often she seemed to lose herself in her recollections of the past.

Standing at the window of the study, she spoked as if to herself:

"We looked off across these valleys and stands of royal palms to the profile of Havana and I loved that view, and I still do."

Mary Hemingway tapped the large desk with her fingers. "This is local Cuban wood . . . it's impervious to wood worms."

Did Hemingway work in the study? "Sometimes. He would bring his little Royal typewriter in here and sit there, you know, with papers and books and stuff all over the place."

Hemingway preferred to work in his bedroom, she said. He wrote during the cooler morning hours, standing up and typing. They usually went to bed early and got up early.

A two-story tower stands near the house with a room on the upper level. She chuckled:

"The amusing thing about this tower is that I had it built so that Ernest would have a place to work, undisturbed by the noise of the servants in the house and what-not. I designed the table just as he wanted, with no drawers. He said he liked the tower.

"So when it was finished he went up happily with his pads, pencils and typewriter and, oh, not more than a week later. I came through into the garden carrying the usual vegetables in a basket . . . and here was Ernest standing in the sitting room.

"He had come down from the tower with his typewriter in his hand. He said, 'I can't stand it up there, it's too lonely. It's too quiet.'"

Up in the tower, Mary Hemingway handled the hunting rifles that were set in racks. "This old 22-pump was my favorite. But I didn't like these two-trigger guns. I often cut my finger with them."

She went over to one of the bookshelves. "That's a set of Ernest's works in Russian. Mikoyan (Soviet Deputy Premier Anastas) gave them to him when he visited us in 1959.

"I was in a heliuva jam. We didn't have snacks to serve him. But we had had codfish stew for lunch so we put codfish stew on crackers. We served that to him . . . and booze."

Mary Hemingway then looked up at a row of mounted trophies. "Hey those horns are upside down." And then, so as not to embarrass her Cuban hosts, she said to an American reporter:

"Oh well, what's the difference."

Shortly after Hemingway shot himself fatally in his Ketchum, Idaho, sitting room in 1961. Mary Hemingway came to Cuba and gave La Vigia and most of its furnishings to the new Cuban revolutionary government.

On that visit, she was having some trouble with the Cuban cultural council about taking a box of paintings by French artists back to the United States, Castro dropped in to see her, she said.

"I told Fidel about the problem. A couple of days later it was all solved."

She also had a lengthy visit with Castro on this trip. She had brought a list of books that she wanted to take home from the Hemingway museum, but Castro seemed not as eager to oblige this request.

"It's a most difficult problem," Castro told a small group of American reporters yesterday, "I asked her if she wanted me to be shot because there is unanimous resistance to touching anything in the museum.

"It's like a sanctuary, something sacred. Maybe we can find a technical solution. We might be able to make copies of the books for her."

Castro told Mary Hemingway that he had read her husband's work numerous times. "He's the fiction writer that I read most." the Cuban leader said, adding, "Everything I know about bulls, I learned from Hemingway."

Mary Hemingway arrived in Cuba Saturday and was scheduled to leave last night. She was here with a group of MGM filmmakers seeking Cuban cooperation for a biographical movie of Ernest Hemingway.