The United States and four other Western nations have drafted a "detailed blueprint" for independence for the territory of Namibia.

The Western powers will attempt to get South Africa and the SWAPO liberation group, which has been waging a guerrilla struggle to gain control of the territory, to agree to the plan during talks Feb. 11 and 12 in New York.

The combined effort is viewed as a last-ditch attempt to get the warring parties to compromise on an "internationally acceptable" independence formula for Namibia, the former German colony of Southwest Africa which has been ruled by South Africa since World War I.

But the United Nations and the World Court have been demanding that South Africa withdraw from Namibia for more than a decade.

South Africa has promised to grant independence to the mineral-rich territory by the end of this year, but has sought to bar any role for the South West Africa People's Organization (SWAPO).

SWAPO has been recognized by both the United Nations and the Organization of African Unity as the legitimate representative of the majority of the Namibian people. Any plan for independence that excluded SWAPO would produce a new country that would be an international outcast facing a continued guerrilla insurgency.

As an indications of Western concern over Namibia, the New York talks will be conducted at the foreign ministerial level.

Secretary of State Cyrus Vance and the foreign ministers of Britain, France, West Germany and Canada will meet alternately at the American Mission to the United Nations with South African Foreign Minister Pik Botha and SWAPO leader Sam Nujoma in what are called "proximity talks."

The idea of having the Western powers meet separately with each party - and then relay whatever demands or concessions are made to the other - was devised to get around South Africa's refusal to participate in direct, face-to-face negotiations with SWAPO.

U.N. Secretary-General Kurt Waldheim has also been invited to take part in the talks, which will be preceded by preliminary meetings Feb. 9 and 10 on the ambassadorial level.

The five Western powers, which have been working for almost a year to devise an independence formula for Namibia, have now drafted what a U.S. official described yesterday as a "detailed blueprint" for the transition process.

Details of the plan, which have not been made public, will be formally transmitted to South Africa, SWAPO and a number of concerned African governments late next week.

Sources indicated that the Western proposals include a detailed formula for drawing down the South African military presence in Namibia, installing a U.N. force that would maintain law-and-order during the transition period, and a timetable for elections.

The major sticking point continues to be the question of the presence of South African troops in Namibia in the period leading up to elections.

SWAPO has long publicly insisted that all South African troops must be withdrawn before any elections. South Africa's latest position, according to sources in Pretoria, is that it would cut its troop strength in Namibia to about 2,500 men.

Diplomatic sources say the Western powers are proposing that 1,500 South African troops be allowed to remain during the transition period, but that they be confined to the south of the territory along the South African border.

A U.N. force numbering at least 1,500 troops - and perhaps as many as 3,000 - would take over security duties in the territory under this proposal. Additional civilian U.N. employees would be sent to Namibia to supervise elections.

U.S. officials expressed cautious optimism that both South Africa and SWAPO might be ready to accept this kind of formula.

"Obviously, the foreign ministers wouldn't all be coming to New York for these talks if we didn't think there was a good chance of success,' a U.S. official said.

But South Africa has been following a two-track approach on Namibia, proceeding with its own plan for granting independence to the territory while continuing to take part in the discussions of an international solution.

In recent weeks, South Africa officials - in a clear effort to bring pressure on both the Western powers and SWAPO - have hinted broadly of their intention to hold elections in Namibia in June whether an internationally acceptable agreement has been reached by then or not.

South African sources suggested yesterday that unless elections are held by early summer, it may be impossible to meet the independence target date of Dec. 31. Declared one South African official: "Time is running out."