After a spirited internal debate that lasted nearly 24 hours, the leaders of the world's leading industrial democracies pledged their full political resources tonight to reducing the risk of war, and called on the Soviet Union to "contribute constructively" to negotiations to remove nuclear missiles from Europe.

Their seven-paragraph statement was made public by Secretary of State George P. Shultz about seven hours later than planned, reflecting a long dispute about its tone, substance and appropriateness among the seven heads of government, who sent at least one draft back to their foreign ministers to be rewritten.

As finally approved, the joint declaration was more positive in its emphasis on peace and more conciliatory in its approach to the Soviet Union than most recent statements from the western alliance.

There was no shift, however, in the established negotiating position of the alliance in nuclear arms control negotiations at Geneva. The declaration said specifically that if the United States and the Soviet Union failed to reach agreement on limiting medium-range nuclear missiles in Europe, "the countries concerned will proceed with the planned deployment" of new U.S. Pershing II and cruise missiles in western Europe beginning in December.

For President Reagan, the outcome of the long argument over the deliberations was a very broad endorsement of the basic NATO stance on arms control, but at the cost of watering down hard-hitting rhetoric and positions he favors. It also shattered the impression that this would be a smooth, harmonious summit.

Shultz, in a news conference, called the declaration "strong, positive" and "very important," and indicated that it constituted an authoritative response to the Soviets' "statement across the bow" on this issue last week. He referred to the Soviet threat to put new nuclear missiles in eastern Europe if new U.S. missiles are placed in West Germany.

Shultz noted that this was the first security statement adopted at the annual economic summit meetings, which began in 1975. It was also Japan's strongest backing for the NATO approach in negotiations on nuclear missiles in Europe. Japan's new prime minister, Yasuhiro Nakasone, is altering that nation's pacifist position in global affairs.

French Foreign Minister Claude Cheysson, acknowledging that his delegation questioned the wisdom of issuing the declaration, told reporters, "We are not here as a super-NATO," and that the French government "did not want the first and only news from this summit to be on arms control." Cheysson said the declaration does not commit the signers to any particular position in negotiations with the Soviet Union.

In the statement, the leaders of the United States, Canada, Britain, France, West Germany, Italy and Japan pledged to "maintain sufficient military strength to deter any attack, to counter any threat and to assure the peace," while adding that "our arms will never be used except in response to aggression."

At the same time, the leaders declared, "We commit ourselves to devote our full political resources to reducing the threat of war." The main emphasis in the statement was on the search for reduction of arms and tensions through negotiations, which the leaders said they would pursue "with impetus and urgency."

A range of negotiations was mentioned, including those on nuclear weapons, chemical weapons and conventional forces in Europe. Stressing the Geneva negotiations on limiting or banning medium-range nuclear missiles in Europe, the leaders said, "We call upon the Soviet Union to contribute constructively to the success of the negotiations."

The statement warned the Soviets that they would fail in attempts to avoid serious negotiations by influencing western public opinion or by dividing the western nations over British and French nuclear weapons. While saying these weapons have no place in Euromissile negotiations, the statement did not foreclose bargaining on them in other talks.

The difficulty experienced by the leaders and their foreign ministers in composing and approving the statement underscored political differences among them on issues of war, peace and East-West negotiations.

Diplomatic sources said the most strongly contested section of the declaration was: "Our nations express the strong wish that a balanced INF medium-range nuclear missiles agreement be reached shortly. Should this occur, the negotiations will determine the level of deployment."

Some nations, especially the United States and Britain, preferred more emphasis on the requirement for deployment, while Canada preferred more emphasis on avoiding or minimizing the deployment through negotiations, according to the sources.

The disagreements, according to various diplomatic sources, began Saturday night at the first private dinner meeting of the heads of government, when Reagan surprised the others with a tough statement about the necessity of deploying the new U.S. missiles in western Europe on schedule.

He reportedly suggested, as he had in a pre-summit interview with six foreign journalists last Thursday, that deployment of the missiles may be necessary to force the Soviets to negotiate seriously.

British Prime Minister Margaret Thatcher, according to diplomatic sources, took a position close to that of Reagan. Thatcher is campaigning for reelection against leftist Labor Party opposition that wants to remove all nuclear weapons from Britain and to break with the NATO consensus for deployment of the missiles during negotiations.

But Canadian Prime Minister Pierre Elliott Trudeau disagreed, the sources said, urging that more emphasis be put on the need for reaching an agreement with the Soviets that would make the missile deployment unnecessary. Canadian sources, who said Trudeau came here prepared to offer ideas on the missile issue, called the disagreement "a question of balance and emphasis."

Facing protests at home against testing of U.S. cruise missiles in Canada, Trudeau has publicly separated himself from what he has characterized as recent "warlike" rhetoric by Reagan. He has said it is necessary for the NATO alliance to adopt a political posture that could shore up public support for its military policies.

Trudeau also is reported to have objected to the declaration ruling out any future inclusion of British and French nuclear missiles in the U.S. negotiations with the Soviets. NATO resistance to Soviet demands that the British and French missiles be included is a key sticking point in the negotiations.

French President Francois Mitterrand stated his objection to any declaration about European missile issue being made at an economic summit outside a formal NATO alliance setting, according to French sources. France is not a member of the military oragnization of NATO.

Later, however, Mitterrand withdrew his objection to allow drafting of the statement to proceed. There were some suggestions, denied by French officials, that Mitterrand had been using his objections as a bargaining chip for concessions to his views on economic issues.

At the end of the leaders' dinner Saturday night, Reagan went upstairs to another room where the foreign ministers were finishing coffee after their repast. At that point, according to Schulz, the president announced to the group a decision by the leaders to seek agreement on a joint statement to be composed by the ministers and issued today.

Reagan handed Shultz about eight pages of notes of the dinner discussion as the basis for the joint declaration.

The accounts of other diplomats suggested that Reagan and Shultz came here thinking that a statement on the Euromissiles could and should be issued.

It took the foreign ministers all of this morning, and their bosses much of the afternoon, to agree on the declaration.