Spain's attorney general José Manuel Maza has died suddenly in Argentina, where he was attending a conference. He was 66.
Earlier on Saturday he had been reportedly taken to an intensive care unit with a kidney infection.
Last month, Mr Maza called for charges to be brought against Catalan leaders, following a banned independence referendum in the region.
Spain's political leaders have been paying tribute.
In a tweet (in Spanish), Prime Minister Mariano Rajoy expressed his "deepest condolences" to Mr Maza's family and friends.
Justice Minister Rafael Catalá described Mr Maza as an extraordinary lawyer and public servant.
Mr Maza was appointed Spain's attorney general in November 2016.
Key figure in Catalonia's crisis
By the BBC's James Reynolds in Barcelona
José Manuel Maza's sudden death has shocked the Spanish political establishment.
He'd been heavily involved in the constitutional crisis here in Catalonia.
Mr Maza had decided that the Catalan separatists' attempt to break away from Spain was a criminal matter.
This decision to prosecute found widespread support in Spain's conservative government.
Mr Maza's death may not change Spain's legal policy towards the deposed Catalan politicians.
Right now, the main target of the prosecution, deposed Catalan leader Carles Puigdemont, remains in Belgium - from where he is contesting Spain's request to extradite him.