The year was 1918 and all around Washington new government buildings were swarming with employes, hired to help the war effort in Europe.

But many of the offices were a long way from lunch counters, forcing government planners to ask: Where are all of those workers going to eat lunch?

As a result, what was then the Office of Public Buildings and Grounds of the National Capital set up what it called the Joint Welfare Service to feed the government's employes. All food-service or other retail operations in federal buildings here had to be operated by the agency.

Now, 66 years later, that program has evolved into a $67 million-a-year business known as Guest Services Inc. Today, however, the company is undergoing a transition from its special longtime relationship with the government into a purely private corporation.

"We are no longer who we were," said its president, S.J. (Sib) DiMeglio. "By 1989, we will have no preferential contracts from the federal government, and we'll be just like any privately held corporation."

The Joint Welfare Service was first incorporated as a quasi-governmental business in 1927 as the Welfare and Recreation Association of Public Buildings and Grounds. At one time, it operated about 100 facilities, including about 50 cafeterias, concession stands, barbershops, parking lots and vending services.

In 1945, the firm began taking on business from other agencies and changed its name to Government Services Inc. The first outside business came from the Tennessee Valley Authority, which asked the firm to operate a lodge that the TVA had built in North Carolina and turned into a resort.

By the 1970s, the firm also was operating virtually all of the National Park Service's feeding and concession operations in the Washington area, as well as lodging, recreational and feeding operations at Mount Rainier (Wash.) National Park and Sequoia-Kings Canyon (Calif.) National Park.

The final metamorphosis occurred over the last decade.

In 1975, after the firm began having financial problems, the General Services Administration began letting it set its prices. Four years later, the two reached an agreement under which it no longer had the exclusive right to operate government feeding operations and concessions here. In 1981, GSI decided to mark that change by keeping its initials but changing its name to Guest Services Inc.

From DiMeglio's point of view, the company was then free to shed the cafeterias that had been losing money and escape the 8 percent limit that the GSA had set on its profits from GSA business. When profits ran higher, GSI often rebated them to its customers, one reason that it could offer a Thanksgiving dinner this year for $1.69.

Under the phase-out plan, three cafeterias are put up for competitive bids each year. GSI is allowed to select two of them and the GSA picks the third one.

Contracts for 14 of Guest Services' 35 cafeterias have been terminated and new contracts have been awarded for nine of the facilities. (Two of the remaining five cafeterias were closed, two were turned over to the Blind Industries of the District of Columbia for operation under another preferential service program, and the CIA took over the operation of one of its cafeterias.) Guest Services bid on five of the contracts but won only one, at the Internal Revenue Service.

Because of the decline of its government business, Guest Services recently made two acquisitions. First, in April 1982, it bought Cleaves Food Service Corp., a food-service company that serves retirement communities, health-care facilities, schools and colleges. And last year it added the five Mr. Gatti's Pizza restaurants in Northern Virginia and plans to expand the chain by up to 40 outlets over the next several years, according to James Pflaging, GSI's vice president for marketing and development.

DiMeglio said the firm's diversification is simply good business -- and a way to retain good employes. "We want employes who have futures and ambitions in the food-serving business to stay with us," DiMeglio said. "Without diversification into the private sector, we couldn't offer them anything."

"The thrust of this company is to try to supplant business that we are losing," he added. "If we don't do that, we won't be around much longer."

Meanwhile, as the GSA and GSI try to complete their friendly divorce, GSA's inspector general has said in a report that the agency should seek authority from the Office of Management and Budget to centralize control over all Guest Services operations in the federal government -- including those traditionally contracted with other agencies.

The report also recommends that the GSA seek a Justice Department opinion on how the government's interests -- in terms of equipment and the remaining cafeterias -- can be protected if Guest Services should run into new financial problems because of its expansion into the private sector.

Guest Services officials are reviewing the situation and had no comment.

"Despite any concerns or criticism in the audit, we've had an exceptionally good relationship with Guest Services over the years," said James G. Whitlock, the GSA's regional commissioner of public buildings. "We think we've been able to feed employes well without having to subsidize the operation."