The chief of Romania's Intelligence Service has resigned after criticizing the country's top court for rejecting security laws which allowed the government to collect data on people without court approval.

The Constitutional Court earlier this month rejected laws that would have allowed authorities to retain data and other personal details on people without persuading a court that the person represented a security risk. The court said the laws were unconstitutional and violated human rights.

George Maior, who directed the Intelligence Service since 2005, stepped down Tuesday, days after he criticized the court and said the laws were necessary for national security and protecting people.

His resignation was accepted by President Klaus Iohannis who will appoint a new chief. .