Sen. Charles Percy (R-Ill.) said he warned the Soviet Union's military high command today that the United States has "the military capacity and the will" to use force of vital Persian Gulf oil supplies are threatened by outside intervention in the Iranian-Iraqi war.

After wide-ranging talks with Soviet Defense Minister Dmitri Ustinov and other Kremlin defense experts, Percy said the Soviets "absolutely denied their intention would be to go through Afghanistan to the gulf, endangering oil supplies for Europe and Japan . . . ."

Continuing his one-man mission to speak with Soviet leaders, Percy said he was confident after a three-hour session today that the Soviets understood the crucial interests the United States and its Western allies have in maintaining petroleum supplies from the gulf.

"They should never doubt we have the capacity and the will to respond," he declared at a press conference tonight.

The senator, incoming chairman of the Foreign Relations Committee, told the Soviets that the United States intends to increase its own military spending to avert strategic vulnerability in the mid-1980s. He added that there must be a new strategic arms agreement to replace the stalled SALT II treaty, or the Soviets must face the prospect of additional U.S. defense spending "to maintain a balance at whatever cost."

The exchanges, he indicated, were marked by bluntness on both sides, and he hinted that there was little agreement on any of the serious issues or perspectives that divide the superpowers.

He said he told the Soviets that any military intervention in Poland would have "a catastrophic effect . . . . It would destroy the foundation of any effort at cooperation."

Percy said he told the Soviets that this type of response, which he called "linkage," was "a fact of life in America and must be taken into account" by the Kremlin if it hopes to improve bilateral relations when President-elect Ronald Reagan takes office.

The Soviets have granted Percy remarkable access to the Kremlin's leadership in an obvious effort to explore Reagan's views and the tough new mood in the United States after the election. Percy refused to disclose the substance of what President Leonid Brezhnev told him yesterday or Ustinov told him today, saying he must first report and his advisers and to President Carter, if the outgoing chief executive wants to hear from him.

The senator said the Soviets do not "look on me as an emissary of the Reagan administration," but the official press has given his visit prominent television and newspaper coverage.

Percy said Ustinov, who was accompanied to the talks by Soviet Chief of Staff Marshal Nikolai Ogarkov and several other senior generals, declined to discuss the Polish crisis on the grounds that it was a political problem that the senator should take up with Foreign Minister Andrei Gromyko when they meet Friday.

Percy said both Brezhnev and Ustinov "spoke very strongly about the Soviet Union ever making a first strike" in a nuclear showdown with the United States. He said they reiterated Kremlin positions that the Soviet Union has no agressive intentions against the United States, but has engaged in a military buildup of its own solely to "catchup."

Percy said he told Ustinov that both superpowers must continue to act with restraint in the Iranian-Iraqi war, but warned them that "any effort by anyone" to intervene and "to jeopardize an assured flow of oil" from the Persian Gulf" would cause us to react decisively, and there should be no misunderstanding or ambiguity about this."

He also said he told the Soviets that "a decision will be made shortly" in the U.S. about how to proceed with the strategic arms limitation issue, and added that the decision "will be influenced by our perceptions of their short and long-range military and political goals." He said it is an appropriate time for both countries to seek better understanding, since the Soviets are reassessing priorites in preparation for a five-year party congress in February.

U.S. Ambassador Thomas J. Watson Jr. and Robert Galvin, head of the Motorola Corp. and an old friend of both men, have accompanied Percy to the talks.