He went to South Africa expecting to stay for a year. But within two months, he found the country even more horrible and fascinating than he had imagined.

So he stayed 4 1/2 years.

Traveling under his real name, Dan Swanson, and writing under a pseudonym, James North, he sought out an array of people who make up South Africa under apartheid: the British-descended English-speaking whites, the Dutch-descended Afrikaans-speaking whites (or Afrikaners), the blacks who speak one or both of those languages plus an African language, the Indians, the so-called colored people -- a mixture of races.

As a white American, Swanson's freedom to travel among all of these groups was unmatched by any South African, white or black. He hitchhiked in their trucks, went to their houses, drank with them in their kitchens, stayed with them in their homelands. His journey from late 1978 to early 1983 took him all over South Africa as well as Rhodesia as it was becoming Zimbabwe.

The longer he stayed, the more involved he became. He made contact with members of outlawed political movements gone underground and occasionally hid them in his home. He forged close friendships and had love affairs; he lost friends to prison terms and political murders.

Sometimes he was asked to carry messages between members of the underground.

"I didn't go there with the intention of doing this nor did I ask for it," he says. "But I just wasn't going to stand there with my arms crossed."

The result of Swanson's adventure is a just-published book, "Freedom Rising," that he describes as a mosaic of lives in southern Africa. One of very few current general interest books on South Africa, it emerges at a time when apartheid is under the sharpest scrutiny ever in this country and opposition to it demonstrated on a daily basis in front of the South African embassy here.

Though Swanson's odyssey was unusual, it was not out of sync with the pattern of his life -- growing up white in a black neighborhood; becoming a radical journalist at Harvard in the early '70s, traveling the length of South America, and teaching at a maximum security prison in Massachusetts during post-college years.

His passions and his politics came together in South Africa.

"I just got caught up in events," he says.

He was 26 when he left for South Africa with his girlfriend, each pulled by interests in the region. He had interviewed African exiles for the Boston-based Bay State Banner, the largest minority weekly in the New England area. Exiled South African poet Dennis Brutus told him to go see for himself.

"I was just curious," Swanson says. "It just really intrigued me."

The couple made the independent country of Swaziland their home base and traveled around the region. Long after the relationship ended ("That's a whole long other story," he says ruefully), Swanson continued to travel and wrote free-lance stories to support himself. He had arrived with a few thousand dollars and could never afford a visit home.

"My accent changed a little over the years, constantly not hearing Americans," he says. "When I came home, people made fun of me because I had this bizarre accent."

Swanson was speaking English like an Afrikaner.

He is sitting in The Cove, what he affectionately calls his neighborhood bar -- a dark, plain, roomy spot in the Hyde Park area, just a few blocks from Lake Michigan. In his blazer and crewneck sweater Swanson looks nothing like the rest of the customers nor is this really his neighborhood. But he comes here frequently and even wrote parts of his book here.

He grew up about three miles from here, in South Shore, where his mother still lives -- and where Swanson lives again, writing his next book on the Third World debt crisis. (He leaves for Bolivia next month.) Across the street from his home is the public high school he attended. The school changed from about 70 to 10 percent white while he was there, he estimates. "It was an interesting time to go to high school," he says. "I had a great time. I was president of the school -- proof that a nonracial system can work," he laughs. "As if I needed any."

His parents chose to stay in the neighborhood as the color changed from white to black. "They thought they should have an integrated neighborhood," Swanson says.

His mother is a high school teacher-librarian; his father, who died a year and a half ago, did personnel work in the city government. In 1960, Swanson says, his father was fired from his job as a personnel manager for a candy manufacturer when he hired blacks to work in the plant.

Swanson movingly thanks his parents in his book: "They raised me to oppose racism and they taught me how to fight it."

The cast of characters who pass through "Freedom Rising" is like that of a Russian novel: a white supporter of the outlawed African National Congress who concocted explosive devices for campaigns of sabotage; novelist Nadine Gordimer; a banned Indian activist, Siva Patel, who was frustrated being a bookseller; the black writer Ezekiel Mphahlele, who went into exile in the late '50s, became a professor at the University of Pennsylvania and gave it all up to return to South Africa in 1977.

A 46-year-old black woman who has spent her last 30 years as a maid says in the book, "I can say that my life has been terrible. Just terrible . . .

"Nothing will get better here. These white people are rock-hard -- they will never change. Why is there separation here? If I touch you, you don't turn brown, do you? It must be better in other countries."

A black African, Mandla Mazibuko, who became Swanson's friend, told him, "We must be prepared to be like Jesus and die for the people."

And a white antiapartheid sympathizer, Helen Morrison, told Swanson, "We have a very sound saying here in South Africa. We say a Christian here is either going to jail or going to Hell."

Swanson heard the other side too: he hitchhiked with a white truck driver who insisted that blacks were incapable of driving trucks. "Every time a truck came by, blacks were driving," Swanson says. "And the schizophrenia of that guy was extraordinary, because he actually liked these truck drivers and knew many of them."

Swanson also stayed overnight with an Afrikaner farmer who hired blacks as laborers. "We have to civilize and uplift them," the farmer told Swanson. "Without us, they would have nothing. We are giving them the right to develop in their own way, in their homelands, under our guidance. I tell you, frankly and truthfully -- 98 percent of the Europeans here would not mind mixing socially with civilized natives, er, black people."

Black newspaper editor Obed Kunene tells Swanson with some melancholy, "The sad irony is that with the fantastic mix of people here it could be the most exciting country in the world."

Swanson calls himself "a man of the left." And though his book is intelligent and compelling, its author makes no pretense of neutrality in his reports on the country where apartheid means much more than segregation of bathrooms and restaurants.

"There's a difference between neutrality and truth," Swanson says. "My book is truthful, but it's not neutral."

Under apartheid, all blacks carry passes stating where they can live and work. Three-and-a-half million blacks have been forced to relocate in the Bantustans, deemed the black homelands by the government. The Bantustans, spread around the northern and eastern periphery of South Africa like an archipelago, make up only 13 percent of the country. They are the only places blacks can live permanently and own land. Swanson describes the Bantustans -- he visited nine of the 10 -- as "places in which poverty and disease approach genocidal proportions."

However, millions of blacks, needing jobs, become migrant workers and leave the Bantustans for the cities and farms. Those blacks who do work in the cities are not allowed to live there. Instead, they live in ghettos -- what the government calls townships -- outside these white cities. The biggest township is Soweto outside Johannesburg.

Swanson's first guide through Soweto was a young black author and playwright, Mtutuzeli Matshoba, who grew up there. "I don't call this place a city," Matshoba says in Swanson's book. "I call it a labor camp."

Signs of segregation or petty apartheid were everywhere:

"When I wanted to go to the toilet, I would look for the whites-only toilet and within a few weeks you just get used to that," Swanson says. "It was nothing I ever approved of . . . but just a part of reality. It was difficult when you were doing interviews. You would be walking down the street with your black friend and you want to go sit in a bar. Well, you can't bring him in for a drink. There are a handful of what they call multinational restaurants. You go in there. You attract a little attention but not a lot."

Why blacks trusted Swanson had as much to do with his attitude as his American citizenship, he says -- "especially during the Carter-Andrew Young period." In the book, one black man says he trusts Swanson because he has a sincere smile. "I just think people can tell," Swanson says. The passage of time helped, too.

"After a while I would build up friendships," he says. "I would know so-and-so for two years and nothing happened and they knew they could trust me."

Swanson himself was never detained in South Africa. In fact, his only run-in with security police occurred in Swaziland. While he was traveling in Zimbabwe, Swazi police came to the house where he was staying. In Swanson's absence, friends fended off the police and later that night hid all his notes in someone else's house.

"As an American, I would run less risk than just about anyone else," Swanson says. "That was in fact why the ANC the outlawed African National Congress asked me to carry messages. There are people in prison doing five, 10, more years -- white and black South Africans -- for the same kinds of things I did."

Swanson surmised that in South Africa under the Reagan administration, he, as an American, would not be hassled. "Reagan was kind of my protection," Swanson says, laughing.

Today, he says, "I would certainly be arrested."

At college he joined the daily newspaper, the Harvard Crimson, more interested in politics than journalism. Eventually he became president of the paper. Friends say he was often strident in conversation, less so in prose, always a romantic -- whether he was writing a piece or wooing a woman -- and never a cynic. "Exhortatory, always chain-smoking," says Nicholas Lemann, a former Crimson colleague and now national correspondent for The Atlantic Monthly.

"He was the last of the angry Crimson presidents," says Michael Kinsley, editor of The New Republic, whom Swanson acknowledges as one of his mentors.

According to friends, he was the "champion of the underdog." (He amends: "I'm not a champion of the underdogs who can often speak very well for themselves. I'm in alliance with them.")

He demonstrated and wrote articles against Harvard's holdings in Gulf Oil Corp., which had investments in Angola, at the time a Portuguese colony. And he wrote what one friend remembers as an elegant and moving appreciation of former leftist Chilean president Salvador Allende when he was slain in 1973.

"There were a lot of romantic revolutionaries in the early '70s," says Kinsley, "and most of them are now investment bankers, but Dan is exactly the same . . . He's changed less than anyone I know. He's still very smart, very engaged. He hasn't lost that edge of anger."

Swanson became deeply and intellectually involved in the antiwar movement. "I went to just about every antiwar demonstration that took place in the Boston area," he says. He wrote frequently about the Vietnam war and referred to Henry Kissinger as a "war criminal" -- a view that hasn't softened over the years.

"If you want to know why I went to South Africa," he says, "it would have to be Vietnam. That stimulated my interest in the rest of the Third World."

He took Harvard President Derek Bok to task on divestiture, enjoyed getting into friendly debates with government professor Martin Kilson -- whose course on black urban politics Swanson took as a freshman -- and criticized former Dean of the Faculty John Dunlop (later a secretary of labor), but also admits to a certain admiration for him.

In fact, Swanson is going back to Cambridge -- to speak at the Institute of Politics at Harvard. "If Bok is around," says Swanson with a chuckle, "I'm sure he's thinking, 'I thought I got rid of that guy.' "

"I think that Dan was always a guy who was looking for the great story of our time," says Garrett Epps, associate editor of Algonquin Books of Chapel Hill and another mentor. "He was somebody who had so much energy and so much courage and so much vitality that daily life wasn't enough for him. It was a little bit like the Marines at peacetime . . ."

Epps sometimes sent Swanson money in southern Africa -- $50 here or there. "You have to understand," says Epps, who helped Swanson edit his book, "there are a lot of us '60s radicals who are well-fed and Dan was carrying our water. It was $50 well spent. What the hell is $50 anyway? Dinner for one in Washington."

Now, if Swanson's politics haven't changed, his manner has. He mirrors the picture on the flap of his book jacket -- short hair and crew neck sweater. Nearly preppy. He doesn't smoke anymore, either.

He speaks moderately, thoughtfully about the yuppie culture of which many of his classmates are now a part. "In a way I feel sorry for them," he says. "It seems to me in life you can express yourself in two ways, broadly speaking: how you work and how you consume . . . It strikes me that a lot of these people who are going on about different brands of wine and so on, they're really expressing a lack of interest -- their personalities can't express themselves through work."

Swanson estimates that apartheid will last for the next 10 to 20 years in South Africa. In the meantime, he says, "there's going to be more violence and it's going to last a long time."

He supports total economic sanctions, though he says he doesn't think that's likely: "American companies should either pull out of South Africa or be forced to. The equivalent of American companies staying there on the grounds that it purportedly provides blacks with jobs is the equivalent of Nazi Germany in the '30s -- that companies should stay there because Jews got jobs out of it. And that's not a charge I bandy about lightly . . . I say it's a parallel, not an exact comparison."

Antiapartheid protests in this country, says Swanson, have had "a positive effect" -- he cites the suspension last February of the resettlement policy. And he feels a general optimism about South Africa, a gift perhaps from those he met:

"In a place where there is this terrible system, the courage of the people who oppose it and who refuse to be cynical and refuse to be broken by it and embittered by it is just awesome and very inspiring . . . I don't think there will ever be an evil that I can't see some possible good coming out of it."