Brazil has confirmed plans to develop a secure and encrypted email service, as part of its efforts to bar foreign surveillance agencies, including NSA, from intercepting the country’s electronic communications.

According to Brazil’s President Dilma Rousseff, the creation of a new secure email system for the federal government was required to prevent possible espionage, and to strengthen the privacy of official communications.

Brazil’s Federal Data Processing Service (Serpro) has been ordered to develop the new secure network for communication between employees of the state.

Anticipated to be trialled by the end of October, a version of the system would be offered free to the Brazilian public.

The system could be designed to interact with German webmail service provider Gmx and equivalent encrypted services, in which case the US NSA and the UK GCHQ could be shut out unless the countries where the appropriate servers were deployed decided to work together.

Brazil’s latest move comes in the wake of reports that the US had read private emails belonging to Rousseff, after which the South American country began pushing for new legislation to force internet giants such as Google and Facebook to set up local data storage centres.

The new law would also mandate tech firms to move as per the Brazilian privacy rules, while the government would store data including tax information within the country to defend it from foreign spies.

Forcing internet firms to store user data locally would also shun Brazilian access to some of the services offered by foreign tech firms.