MADRID, Dec 19 (Reuters) - The Spanish government has ordered state fund SEPI to acquire a stake of up to 10% in telecoms giant Telefonica, the state holding company SEPI said in a statement on Tuesday.

The acquisition by the Spanish state would come after Saudi Arabia's telecom company STC built a 9.9% stake in Telefonica worth 2.1 billion euros ($2.23 billion) in September.

The fund said in a statement to the stock market supervisor it would complete the acquisition of the necessary volume of shares, while minimising the impact on the share price.

With a long-term commitment, SEPI's participation will provide Telefonica with a "greater shareholding stability for the company to reach its objectives and, therefore, it will contribute to safeguarding its strategic capabilities," it added.

(Reporting by David Latona and Jesús Aguado; Editing by Andrei Khalip)