After years of tortuous negotiations with often skeptical Western and Japanese companies, Saudi Arabia has nearly completed arrangements for the last of its costly, capital-intensive "basic industries" designed to lay the foundation for an advanced technological economy which this country hopes will eventually replace its total dependence on oil exports.

In the first days of February, Saudi Arabia signed an agreement for the fifth of six gas or oil-derived chemical plants to be located in the new industrial city of Jubail on the Persian Gulf. The sixth agreement is to be signed this month.

The deal, which took seven years to negotiate with two American companies, was almost of more symbolic than economic importance to the Saudis. For behind the dry details of the accord -- a $400 million investment for a 650,000 ton methanol plant -- lies a lively controversy over the wisdom or ability of this sparsely populated desert kingdom in setting as its goal a giant leap from a chamel-and-tent to a jet-and-computer society in less than a single generation.

"Saudi Arabia is in the 21st century in industrial development," boasts Hisham Nazer, the kingdom's highly articulate planning minister and author of its three five-year plans.

In fact, the Saudi government has had its troubles trying to make the jump there. Despite its offers of low-interest loans, cheap energy and raw materials, it has failed to find outside partners for a number of its proposed petrochemical and other high technology schemes, the primary focus of its current, 1981-85 plan. As a result, it has been forced to reduce the size -- at least for the time being -- of its grandiose vision of the kingdom's industrial future.

At least five projects at Jubail -- which Nazer calls "the most modern, efficient city in the world" -- are being postponed, consolidated with others or scrapped altogether. But nine other petrochemical, fertilizer or steel projects, involving an investment of nearly $12 billion either three or at Yanbu on the Red Sea, are all finally under way.

When completed in the mid-1980s, they will still only provide Saudi Arabia with about $5 billion in additional export earnings, a tiny fraction of its current $100 billion oil revenues.

Meanwhile, work on the basic infrastructure of the two new industrial cities at Jubail and Yanbu is going full tilt ahead. At least $7 billion has already been invested in the building of ports, homes, roads, water and sewage facilities at each site and many additional billions are allocated for more of the same under the current plan. Altogether, the government is expected to spend $50 billion on these two industrial schemes before it has finished them.

One major indirect effect of all this investment has been to increase the number of light and medium-sized industries operating in Saudi Arabia from 400 to 1,000 over the past five years, representing an additional investment of $7.6 billion, according to Deputy Industry Minister Fuad Farsi.

More than one outsider has questioned the viability of the complex of highly sophisticated industries being built from scratch on the all too possibly symbolic sands of the Saudi desert and the ability of the manpower-short kingdom to maintain and run it. Similarly, more than a few Saudis, particularly among the fundamentalist religious leaders, have worried that the kingdom will lose its Islamic soul and culture in the process of reaching for the 21st century.

All have worried, in varying degrees, about the impact of such high speed development on its political stability.

But after spending something like $180 to $200 billion in the past five years to change the landscape of the country from shore to shore, Nazer says, "If I were to do it again, I would do it in the same way."

Only, he adds, at less cost and with different foreign partners.

"We are more cost-conscious and we would have tried the Easterns [notably Koreans] from the very beginning."

Nazer, like most of the new class of Western-trained Saudi technocrats behind the drive for industrialization, takes enormous pride in the kingdom's achievements over the past 10 years. Above all, he feels it has proven its ability to absorb tens of billions of dollars in investment. Citing the second, $142 billion five-year plan which has just ended, Nazer remarked, "Everyone ridiculed us and doubted we could spend all that money. Well, we did."

In fact, inflation, bloated commissions for Saudi middlemen and padded contracts caused the government to spend upwards of $60 billion in addition. Even with its spiraling oil income, which reached $100 billion last year, Saudi Arabia actually managed to overspend its budget in 1978 and 1979.

With the inauguration of its third five-year plan this year, the Saudi government is shifting priorities somewhat but increasing its investment to $237 billion, which another $50 billion put aside for inflation. Instead of concentrating on basic infrastructure -- roads, ports and communications -- the focus now is on the launching of its capital-intensive and advanced technological "basic industries" and the training of Saudi nationals to run them.

"I think the real development of Saudi Arabia will really begin with the third plan," remarked Nazer.

One of the big question marks hanging over the Saudi industrial strategy -- other than the acute man-power shortage -- has been whether the government could find the foreign partners willing to share in the investment, provide the skilled management initially to run these fancy plants and above all market their output on an often glutted world market.

It has not been easy. But the government has used its oil and dollar leverage to persuade many Western and Japanese firms that it will be worth their while to invest in the kingdom's industrial future. Its chief lure has been the promise of oil "entitlements," the right to a guaranteed amount of oil in return for their technology, management skills and help in marketing.

For example, in the latest methanol deal, the two American partners, Texas Eastern and Celanese Chemical Co. together holding a 50 percent interest, will be "entitled" to up to 30,000 barrels of Saudi oil a day, according to industrial sources. On the other hand, they are responsible for marketing 75 percent of the methanol on the world market.

Other foreign partners are reported, to have obtained guarantees of up to 200,000 barrels a day on the basis of 500 barrels for every $1 million of investment.

Western economists and bankers here seem to feel the Saudis will probably make their industrial breakthrough in the end, if only because of their enormous wealth and leverage over the West's hungry oil companies. Speaking about the viability of all the new projects, one banker commented offhandedly, "They [the Saudis] will make them economically viable. They will subsidize these new plants until they become viable in their own right."