(CNN) -- Bahrain on Tuesday warned against anti-government activity one day ahead of its plans to lift emergency laws that had allowed for a crackdown on opposition leaders, journalists and other activists.
The country's Ministry of Justice warned against "any type of activities that could affect the security or harm the national peace and safety," Bahrain's official news agency reported.
The lifting of the emergency laws, imposed in mid-March, is thought to be an effort to signal an end to months of civil unrest stemming from the Arab Spring, a wave of anti-government demonstrations that started in Tunisia and have since roiled several countries in the Middle East and North Africa, including Egypt, Syria, Yemen and Bahrain.
On Tuesday, Bahrain King Hamad bin Isa Al Khalifa appealed for dialogue, saying that talks with opposition groups are scheduled to begin in July.
The U.S. pulled its human rights officer from the U.S. embassy in Bahrain after he became the target of a harassment campaign that senior U.S. officials say appears to have been fanned by some hard-line members of the government.
Ludovic Hood, who left the country last Thursday, was for months the subject of threats and anti-Semitic slurs on a pro-government website and officially sanctioned newspapers, the officials said.
Hood was scheduled to leave the country this summer, as his tour of duty was coming to a close. But senor U.S. officials said the embassy sent him home several weeks early over concern for his safety.
Last week, Bahrain said it had released 515 detainees imprisoned since the state of emergency went into effect, though it is unclear how many people are in custody.
The country is also set to hold parliamentary elections in September, filling seats vacated by members of the Wefaq party, Bahrain's largest Shiite opposition group, which left in protest over the crackdown.
The government has since come under intense criticism by human rights groups over its detentions, including the arrest of at least two Wefaq lawmakers.
It is not clear whether those opposition leaders will be permitted to take part in the September elections, though Bahrain has said in the past that all accusations about detainees will be investigated.
Protesters initially took to the streets of Manama, the capital, to demand reform and the introduction of a constitutional monarchy. But some have called for the removal of the royal family, which has led the Persian Gulf state since the 18th century.
Young members of the country's Shiite majority have staged protests in recent years to complain about discrimination, unemployment and corruption, issues they say the country's Sunni rulers have done little to address.