South Africa, under fire for its policy of institutionalized discrimination against blacks, remains one of the world's more controversial and troubled areas, but recently reported a modest rise in tourism.

Momenets before lunch began, the waiters had aligned themselves primly, almost at attention, in their starched white jackets. The flowers had been arranged artfully in a huge vase, birds of paradise, chrysanthemums, carnations and protea. Bowls mounded with vivid, ripe fruit rested on napery that shone glacially in the sun.

This being South Africa, the menu that implied many choices meant none was required; everything on it could be ordered without the consequence of reproachful looks or a bigger tab. A hungry diner could start at the top with fruit cocktail and eat right down to the bootom - through the cream of vegetable soup, fried fish, crayfish cocktail, breaded pork chop "Robert," filet of beef, cold meat, salad, chocolate pudding, peach coupe "Montrose," cheese, cookies and coffee.

This was no ordinary restaurant. It was the dining car of what must be the most luxurious train still running, the $5.2 million Blue Train. Depending upon the time of the year, it travels the nearly 1,000 miles between Cape Town and Pretoria one to three times a week and space is booked for months beforehand. The trip takes 26 hours, or 24 1/2 hours between Johannesburg and Cape Town, and costs as little as $90 a person, including meals.

Having twice before churned, rumbled and rocked in sleeping cars, to Vienna and to Rome, my wife, Betsy, and I mourned the loss of romantic trains like the now departed Orient Express. So, although we could have flown between Cape Town and Johannesburg in two hours for 80 per cent of the cost, we decided to give sleeping cars one last try.

We had heard about the Blue Train while planning a vacation to East Africa and southern Africa, and it sounded too good to be true. Nevertheless, we tried in early August to book the Blue Train for mid-October. No luck. Only by rearranging our itinerary and taking it in the opposite direction from what we had originally wanted could we get a reservation - and then only after getting on a waiting list. If it was this hard to get seats, we reasoned, it must be some trip. And it was.

A porter met our cab at the station in downtown Cape Town and took us to a display board, on which was listed each compartment and its occupants. Sure enough, there we were, in 14A. There would be no anxious searching for our berth, no shrugs from bored conductors. Then he led us, our eyes filled with growing disbelief at the facilities glimpsed from the platform, and deposited our baggage inside the compartment. Our name was on the door.

It wasn't gargantuan, but it was plenty big enough for - say - calisthenics, perhaps 50 square feet including the seats. Each of the four fplush seats had a movable footrest. There was room under them for our baggage, plus a closet and additional storage space overhead. We had a sink with not only hot and cold water, but with a spigot for iced drinking water as well. There was also a little box with separate access to the corridor, so that the steward could shine our shoes overnight without disturbing us.

Real lamps made the place seem that much more homey once night fell. And the temperature was perfect - because we controlled it with a thermostat. If the range of the control was too small, we were invited to ask the onboard technician to alter it, but that wasn't necessary.

The giant window and the electric controls underneath it alone were almost worth the trip. Besides the temperature knob, there were four others. One summoned the car attendant, who promptly and cheerfully delivered refreshments from either the bar or the dining car andprovided valet service, too. Then there was the knob with which, childishly, we had the most fun; it operated the venetian blinds, raising, lowering, opening and closing them between the double-paned, gold-tinted window. (The window was tinted to keep out glare). Another knob allowed the passenger to choose between the radio and taped-music positions, while the last control changed the volume.

It's not that the train was late in starting, it's just that it seemed that way, so imperceptibly did our journey begin precisely at noon. Traveling smoothly at speeds of up to nearly 70 miles per hour, we might have been in an airplane. The insistent, pounding clickety-clack of ordinary trains was absent. So was the pitching and jouncing, the lurching and swaying. We fairly glided out of Cape Town just as the first sitting for lunch began.

We were some cars away from the dining car, but getting there was more like walking through a long hotel corridor than a train. The reason for this impression was that the coaches were permanently coupled, with wall panels, flooring and wide doorwasy masking the juncture.

"We try to run it like a five-star hotel," the affable if harried train manager, I. Dodds, told us. The fact is that they succeed.

After lunch we went back to our compartment, where, satiated, we toyed with those window controls, read and napped. In no time it was tea time. Although we could have had tea brought to us, we went to the lounge. There we spent the waning daylight hours sitting, sipping, reading, sightseeing and chatting with some of the other passengers.

Nowhere on the train did I see a nonwhite traveler, although a train brochure says compartments have been set aside for five nonwhites among a total of 108 passengers. (A spokesman for the South African Tourist Corp. in New York maintained that in the event "locals" were to occupy the space already reserved for blacks, black tourists would still have no problem because they would be assigned any compartments available and would be treated the same as white passengers. He said the compartments were not segregated.)

Whether one should travel on this train in a country with such avowedly racist policies is a question for the individual to answer. I know the arguments against it - all of them. And however strongly opposed I am to apartheid, I have to say that I am sufficiently amoral and sufficiently selfish that I go where I can, while I can, for experiences that are terribly important to me. I didn't like a lot of what I saw and felt in South Africa, but at the very least, I learned much and found much to enjoy there.

What did nearly keep us from going there were accounts of violence that had been printed and broadcast in the summer. Deciding we could always change our plans before leaving Nairobi for Johannesburg, we resolved to assess the situation again then. The violence did subside, and we found that tourists in South Africa know about incidents only through the media. We did not feel afraid anywhere in the country, nor surprisingly, did we detect in the nonwhites we encountered any bitterness or resentment against us.

We detected something equally disturbing, however, an attitude that must stem from years of white dominance, arrogance and oppression. It was an attitude, I suppose, of subservience, and we felt distincly uncomfortable that we should be treated like, well, masters. Would that were different. Today.

To say that the Blue Train has all the comforts of home or of a five-star hotel is to overstate its excellence. But it is not an exaggeration to say that it has to be the best way to travel 1,000 miles, given enough time. I say make the gime, for the train strives toward five-star status in little, laudable ways. Here are a few examples:

At lunch we ordered a bottle of excellent South African wine but didn't finish it. At dinner we sat at a different table and had a different waiter, yet the first waiter remembered us without prompting and brought us the unfinished bottle . . . The morning newspaper was delivered to every compartment unbidden a few hours from Johannesburg . . . The public rest rooms never seemed to get dirty, never ran out of paper towels and had toilets that actually flushed . . . And certainly not at least importance, there were clean, hot showers in every car for those passengers who didn't have them in their compartment.

Traveling at the lowest rate - although everyone is a first-class passenger - we didn't have a shower in our compartment. Those who paid more did. There were three higher rates, ranging up to $141, but that is for a traveling palace. "That goes first," an official of the railroad said. "It really -goes first."

And no wonder. Not only does it contain a bedroom, but also a lounge room and a full bathroom, tub included. The class below has a full bathroom but no lounge, and the class below that has just a shower and toilet. Our lowly class follows, but how much of a hardship was it? Our compartment was big enough (and you never share with strangers) for each of us to sleep in a comfortable lower, screened from the dawn by self-sealing curtains.

As the day lengthened, the sole bartender, wondrous for his efficiency, brought around the silver tray with nuts, potato chips, olives and cheese squares to accompany the cocktails we wre drinking. Thus did we happily while our time until the second sitting of a dinner that rivaled the best we had eaten in South Africa.

We lingered over dinner, had a brandy afterward in the lounge and found ourselves in our compartment about 10:30 p.m., nearly half way to Johannesburg and in no hurry to get there. The beds were ready for us, a chocolate on each pillow, and we were ready for them. Compared with any number of hotels we've endured in - say, Italy or France - the beds on the Blue Train were far cleaner and far more comfortable and the room far quieter.

The South Africans are early risers, and so, therefore, were we. Not long after dawn we were up, showered and ready for breakfast. There was a slight wait in the lounge, and we took our time over coffee. By the time we returned to pack, there was but an hour or two before we were due in Johannesburg.

Then, the unusual happened. At least, we were told it was unusual. According to train manager Dodds, another train had broken down ahead of us during the night, and we hadn't been able to get by it. He was most apologetic for our lateness. We, however, were amazed, for the train was delayed less time than I've spent trying to get from one side of Manhattan to the other. We were also delighted. Thanks to that "awful" delay, we got a gift. An extra half-hour in a five-star hotel.