Fernando Moran, Spanish foreign minister for the past 2 1/2 years, resigned his post today at the request of Prime Minister Felipe Gonzalez in a move that is seen as strengthening the pro-NATO policies of Gonzalez's socialist government.

The resignation is the first of several that are expected among the 17-member Cabinet, which had remained unaltered since Gonzalez took office in December 1982. A government spokesman said the prime minister would announce a "new look" Cabinet team Thursday.

No official explanation was given for Moran's resignation, which was announced by the state-owned news agency EFE. His successor as foreign minister has not been revealed.

Analysts in Madrid said the development reflected Gonzalez's determination to have a government team that is fully supportive of Spain's continued membership in NATO.

Although Moran never publicly opposed the prime minister's growing enthusiasm for the Atlantic Alliance, he is well known for his neutralist and nonaligned sympathies. Gonzalez, once an opponent of Spanish entry into NATO, is committed to holding a referendum on the alliance issue early next year and is seeking to swing public opinion behind his present stand of continued NATO membership.

Andreu Claret, the spokesman for Spain's minority Communist Party, said Moran's resignation "confirmed the Atlantist shift" in the government's foreign policy.

"By substituting Moran, Felipe Gonzalez has removed one of the last remaining obstacles to Spain's consolidation in NATO," Claret said.

Moran cryptically told reporters today that a change of foreign minister "always carries with it a political significance."

Government sources said the new Cabinet would be closely identified with the prime minister's blend of pragmatic and moderate socialism. Unlike Moran's colleagues in the Cabinet, who followed the prime minister's lead and adopted the attitudes of social democrats, Moran never hid that he was radically inclined and intellectually a Marxist.

The sources said the Cabinet reshuffle will strengthen the government's program of economic austerity and the general monetarist principles that have prompted leftist critics to accuse Gonzalez of imitating President Reagan and Britain's Margaret Thatcher. The reshuffle will give greater prominence to technocrats as opposed to socialist party ideologists.

Moran's resignation comes in the wake of achievements that had made him one of the most admired members of the Gonzalez government. Although generally considered to be "soft" on NATO, Moran made a considerable contribution toward normalizing relations with Spain's European neighbors.