ZAGREB, Feb 19 (Reuters) - Croatian Attorney General Drazen Jelenic stepped down on Wednesday following pressure from top officials after he publicly acknowledged being a Freemason.

"That membership of a legal association did not influence my job in any way, but the recent insinuations in public related to my membership have made my further work in the current role impossible," Jelenic said in a statement.

Prime Minister Andrej Plenkovic had said the government would sack Jelenic unless he resigned.

"There is nothing illegal here. However, this created an unusual circumstance which makes his position (as attorney general) difficult," Plenkovic said.

Jelenic became attorney general in 2018. Some officials of the ruling conservative HDZ party said he should have made clear he was a Freemason before taking office.

Jelenic said in an interview this week that he had become a Freemason after an invitation by a friend and that he understood the invitation was recognition of his professional qualities.

The website of one of Croatia's Freemason lodges says it is an association which gathers people of honour who discuss various moral and philosophical issues and work for the benefit of their community. (Reporting by Igor Ilic; editing by Nick Macfie)