Australia announced yesterday that it will buy the Indian Ocean Cocos Islands from their British owner whose family was given them by Queen Victoria.

Home Affairs Minister Bob Ellicott said Australia will pay John Clunies-Ross, known as "king of the Cocos." $7 million for the 27 atolls making up the group.

The Cocos, which lie more than 1,600 miles west of Australia, were settled by Clunies-Ross' great-grandfather, a Scottish sea captain, 150 years ago and the family has farmed copra - or cocoanut oil - using Malay workers ever since.

The Clunies-Ross family was granted title in perpetuity to the islands by Queen Victoria in 1886, but in 1955 they were placed under Australian authority.

The islands have been a bone of contention between Canberra and the Clunies-Ross family because of the manner in which the 400 Malay who work the copra plantation are paid. Clunies-Ross has paid the workers with tokens that can be cashed only at the island stores he owns.

Australia's move to assert sovereignty and assume full control of the islands follows strong criticism of Clunies-Ross's one-man rule by a U.N. decolonization committee that visited the Cocos.

The islands become a full part of Australian territory but Clunies-Ross will remain to supervise the copra plantations.

Ellicott said that after the sale the Malay workers will be paid in Australian currency.

Ellicott said the plantations will be leased to the workers at a nominal rent and day-to-day affairs of the islands will be run by an elected local council. Workers' wages also will be substantially increased.