MADRID, March 25 (Reuters) - The Spanish government has acquired a 3% stake in telecoms group Telefonica (TEF.MC) through the state holding company SEPI, SEPI said on Monday after it reported the acquisition to the stock market regulator.

The government said last December it would acquire a stake of up to 10% in the Spanish company in a counterbalance to the acquisition of a stake in Telefonica by Saudi Arabia's STC.

"The entry of the SEPI, a shareholder with a long-term commitment, will provide Telefonica with greater shareholder stability to achieve its objectives, contributing to safeguarding the strategic capabilities of a company that is strategic for (Spain's) national interests," SEPI said in a statement.

It said Telefonica is strategic due to its leadership in the telecommunications sector and its industrial capabilities, including areas such as security and defence.

STC built a 9.9% stake in Telefonica worth 2.1 billion euros in September. Its holding consists of 4.9% of Telefonica's shares and financial instruments that give it another 5% in so-called economic exposure to the company.

As Telefonica is considered a defence service provider, the Defence Ministry has a say in acquisitions and holdings between 5% and 10%, unless the buyer commits not to request a seat on the board.

(Reporting by Joan Faus Editing by Ros Russell)