Texaco, Inc., once the most profitable of the international oil giants as measured by the return earned on its invested capital, has fallen on harder times in the last few years to the point where it now trails its major competitors.

In fact, Texaco's return has been declining at a time when the trend has been up at most other major oil companies.

Last month, Standard & Poor's, Inc., the credit rating agency, marginally lowered its rating of Texaco's best issues from AAA to AA+. This made Texaco, with $18.2 billion in assets, the only one of the U.S.-based international oil concerns with less than S&P's highest rating. (Texaco's sister companies in this regard are Exxon, Mobil, Gulf and Standard Oil of California.)

S&P cited Texaco's "declining return on invested capital," and said that the company's earnings as a percentage of its long-term debt, and its annual cash flow, are no longer "at levels to support the previous rating category."

Texaco's after-tax return on about $13 billion in total capital stood at 7.9 per cent last year compared with 10.2 per cent in 1972 and 14.2 per cent in 1974 when the one-shot effect of the quadrupling in oil prices substantially boosted earnings, according to S&P measures. Rival companies, meanwhile, saw their returns rise anywhere from 1 to 2 per cent over this 5-year period.

An authoritative industry survey last month, meanwhile, predicted that Texaco would be deposed in 1977 by Shell Oil as the No. 1 gasoline marketer in the U.S., a position Texaco has held for the last eight years.

Moreover, Shell (part of Royal Dutch Shell) will achieve its 7.5 per cent share of the market with 19,000 service stations, one-third less than Texaco's 30,000 stations which obtain a 7.4 per cent market share.

The two developments are not unrelated.

And with the Carter administration's energy package before Congress, and heated debate ensuing over whether it provides sufficient profit incentives to oil companies to explore for new sources of energy, an analysis of Texaco's situation provides some insights into the complex question of oil company profits.

Texaco is certainly neither in trouble nor on its way to the poor house. In 1976, it registered profits of $869.7 million on worldwide revenues of $26.9 billion. But that represents 3.2 cents of earnings for each dollar of gross income, down from 3.3 cents in 1975, 9.1 cents in 1972 and 13.3 cents in 1967.

In fact, Texaco 10 years ago earned nearly the same amount - $709 million worldwide - as it did in 1976, but on sales of only $5.3 billion. And domestic income in 1967 totaled $474.8 million, just a silver below the $478.4 million earned in the United States by Texaco last year.

According to outside analysts, what primarily ails Texaco involves its refining and marketing operations, both abroad and domestically, but particularly in the United States.

Here analysts estimate Texaco has been losing between $200 million and $300 million a year on its refineries and service stations while other oil companies have been deriving up to 25 per cent of their domestic earnings from these so-called "downstream" operations.

Texaco's losses in turn appear directly related to the company's longstanding strategy to market its gasoline and other refined products in all 50 states, the only oil company to do so.

In the not-so-distant past, when oil seemed to be in surplus, it was more important to control the market than to control the resource, and that was Texaco's premise.

But this has proved to be an expensive proposition in a period of high inflation, and Texaco also has maintained a dispersed network of small refineries to supply the stations. The refineries are not only less cost efficient, but Texaco says they have been penalized competitively by the federal government's "entitlements" program, which gives similar-sized independent refineries a subsidy on their crude oil costs of as much as $2.40 a barrel, or 6 cents a gallon - an advantage Texaco finds impossible to make up for.

Proud of its farflung marketing presence, Texaco earlier this year nevertheless took the first steps to pull back from a 50-state marketing web, announcing it was withdrawing from Montana and the region around it as the initial move in a major retrenchment.

Texaco vice president and treasurer Richard G. Brinkman indicated that all of the company's downstream operations are being reviewed with respect to return on investment, and wherever long supply lines or distribution costs make markets unprofitable, Texaco is prepared to withdraw.

"If that means reduction in volume or market share, we're prepared for that," Brinkman said in an interview at the company's New Harrison, N.Y., headquarters in suburban Westchester County. (Until a few weeks ago, Texaco's main office was located in New York's Chrysler Building.)

In 1972, the number of service stations supplied by Texaco peaked at about 36,000. Now the number is 30,000, and the number has been declining by about 1,000 to 2,000 stations a year. Brinkman said he expects that trend to continue.

However, Brinkman complained that federal allocation rules hamper Texaco's abilities to adjust to competitive situations and pull out of unprofitable operations because the company is required by the government to see that customers continues to be supplied.

And he inveighed in general against "the highly regulated climate in which Texaco operates" as the main reason for the company's domestic profit problems. Brinkman said Texaco has been affected disproportionately, compared to other oil companies because of its large domestic production of price-controlled oil and gas.

While analysts agree that an end to the entitlements program and a lifting of price controls particularly on natural gas would benefit Texaco probably more than any other company, they also point out that Texaco already has benefitted significantly from the sharp rise in energy prices that followed the quadrupling of oil prices in 1974 by members of the Organization of Petroleum Exporting Countries.

Between 1972 and 1976, Texaco's domestic crude oil and natural gas revenues doubled despite some significant declines in production, rising by more than $1 billion. That represented an increase in after-tax net income of $200 to $300 million, according to a research report by a Merrill Lynch, Pierce, Fenner & Smith petroleum analyst, Timothy J. Quaid. And that net figure followed deductions for depreciation, depletion and amortization.

This large improvement in domestic producing operations, however, "has been essentially counterbalanced by a disastrous decline in earnings from domestic refining and marketing operations," leaving the company's domestic earnings up only slightly for this period, he said.

Tellingly, in spite of this flat trend, the lion's share of Texaco's capital and exploratory expenditures has been made in the U.S. For the first half of the year, this came to about $500 million, or 71 per cent of the total, including about $337 million for exploration and production.

Furthermore, Texaco is able to fund its estimated $1.5 billion annual level of capital expenditures worldwide entirely from its internal cash flow.

Other problems affecting Texaco's domestic earnings have nothing to do with controls or government regulations.

As Wilbur Gay, the oil analyst at Goldman, Sachs & Co., points out, Texaco operated as two separate companies until about 1972. Its domestic oil properties - primarily the enormous volumes produced from its Louisiana acreage - were sufficient to supply nearly all of its domestic refining needs.

Abroad, Texaco's main source of crude oil derived from its 30 per cent share of the Arabian American Oil Co., or Aramco, the consortium which developed and pumped the vast Saudi Arabian oil fields. That oil was used to supply Texaco's foreign refineries.

But when Louisiana production began to fall in 1972, Texaco had a problem because - except in California - only its domestic refinery in Eagle Point, Pa., was capable of running the high-sulfur Saudi crude oil without the consequences of corrosion.

Since 1972, Texaco's reliance on imports for its U.S. refineries has risen from 5 per cent to 28 per cent. But while the company has embarked on a $230 million modernization program at its two biggest refineries - in Port Arthur, Tex., and Convent, La. - so they can utilize the Saudi crude for their combined 540,000-barrel-a-day capacity, Texaco meanwhile has had to buy about 200,000 barrels a day of low-sulfur crude oil to keep its refineries operating.

Purchases of so-called "sweet" crude from Nigeria, Algeria and other African countries in the interim has cost Texaco from $1 to $1.50 a barrel, including transportation, Gay estimates.

Another drain on Texaco's domestic earnings has been a five-year contract to supply aviation fuel to American Airlines at fixed prices that were well below the market. That contract, which expired on Aug. 31, was estimated to have cost Texaco as much as $70 million a year, before taxes.

"Exxon in 1960 looked like Texaco does today, and so did Mobil and Standard Oil of Indiana," commented Gay. "The difference is the other companies modernized, shut down their small refineries, expanded their big ones and began shutting down service stations long before Texaco did."

Many industry observers point to Texaco's highly centralized management structure, for nearly two decades dominated by one powerful individual, Augustus C. Long, as one reason for Texaco's slower response to changing production and market conditions.

Long's tenure as Texaco began in 1956 when he was made chairman and chief executive officer, and some believe he still was calling the shots until earlier this year when age required him to retire from the Texaco board where he was chairman of the executive, audit and salary committees - a highly unusual arrangement.

In an unusual in and - out career, Long actually retired as an employee of the company at the beginning of 1965, only to be called back at the request of the board in September 1970 to replace J. Howard Rambin, who took a surprise early retirement as chairman at the age of 59. The reason given for Rambin's retirement was personal pressure resulting from the death of his wife, but some observers noted that Texaco's performance had declined from its record level of profitability during Rambin's tenure.

Marion J. Epley was named to succeed Rambin as chairman, but Long continued to keep the chief executive officer job - the position conferring actual responsibility for running the company - as well as the chairmanship of the board's executive committee.

In 1971, Epley also took early retirement soon after his appointment due to poor health.

Maurice F. Granville, the current chairman, was named Epley's successor in April 1971, but did not get the title of chief executive for a number of months. Meanwhile, Long stayed on as chairman of the board's three main committees until earlier this year.

Now, however, there are a number of board changes either recently completed or in the offing, and analysts see them as an encouraging sign that Texaco is prepared to inject some new decision-makers into the top of its organization.

Three younger senior vice presidents, Alfred C. Decrane Jr., James Kinnear and Richard Palmer, have been added to the board. Meanwhile, the board's vice chairman, Wilford R. Young, and the senior vice president for Eastern Hemisphere production, Laurie W. Folmar, both in their 60s, are scheduled to retire soon.

Texaco, which was founded in 1902 after the fabled discovery of the Spindletop Field in Texas and which celebrates its 75th anniversary this year, has the reputation of being the most tight-lipped company in a close-mouthed industry.

"At an American Petroleum Institute meeting, there will be 12 Mobil guys, 12 Jersey guys, 12 Conoco guys, and 1 Texaco guy taking notes," is one old saw about the company's secretive posture.

Now the once highly successful oil company faces the challenge of turning around some of its troubled operations, and analysts believe the process already is taking hold. They note Texaco's extremely strong domestic reserve position in both gas and oil, and Gay of Goldman, Sachs, for example, believes the company could break into the black on its domestic refining and marketing operations by the early 1980s. Abroad Texaco has a strong potential in production, but its marketing and refining problems are expected to continue even longer.

"This is a case of the worst statistical inference being made at a time when their business outlook is improving," says Albert Anton Jr., petroleum analyst with Carl H. Pforzheimer & Co., of S&P's action in lowering Texaco's credit rating one notch.

"But when an elephant is galloping downhill, he doesn't pivot and turn around on a dime," Anton analogized. "The company has been doing the right thing for the last few years, but it hasn't been showing up in the earnings."