MADRID, Jan 3 (Reuters) - Spanish telecoms group Telefonica said on Wednesday it had reached a deal with unions to lay off up to 3,421 employees in Spain in a plan it estimates will cost around 1.3 billion euros before taxes as it seeks to reduce costs.

Telefonica did not say when the layoffs would take place. The country's largest trade union UGT had said last year they would be by 2025.

(Reporting by Joan Faus Editing by Chris Reese)