A federal judge has ruled that Chicago’s ordinance banning gun sales within the city’s limits violates the U.S. Constitution.

While the government has a duty to protect its citizens, U.S. District Judge Edmond E. Chang said Monday in his ruling the government is also obligated to protect constitutional rights, which include the right to keep and bear arms for self- defense. Chang has allowed a temporary delay of the effects of his ruling while the city decides whether to appeal, AP reported.

The U.S. Supreme Court already struck down Chicago’s gun ban in 2010, and last year, a federal appeals court ordered Illinois to pass a law allowing residents to carry concealed weapons.

Chicago Mayor Rahm Emanuel disagrees with the ruling and has asked the city’s lawyer to consider options to regulate gun sales, AP said.

"Every year Chicago police recover more illegal guns than officers in any city in the country, a factor of lax federal laws as well as lax laws in Illinois and surrounding states related to straw purchasing and the transfer of guns,"  Roderick Drew, a spokesman for Chicago’s law department, said. "We need stronger gun safety laws, not increased access to firearms within the city."

The Illinois Association of Firearms Retailers and three Chicago residents filed the lawsuit against the city. Chicago’s gun ban prevented not only federally licensed firearms dealers from selling guns, but also family members gifting guns to each other.

In his 35-page opinion, Chang acknowledged that Chicago installed the gun ban to protect its citizens, one of the fundamental duties of government.

"But on the other side of this case is another feature of government: certain fundamental rights are protected by the Constitution, put outside government's reach, including the right to keep and bear arms for self-defense under the Second Amendment,” Chang wrote.

Last year, Chicago had more homicides than any U.S. city. Chicago still has a ban on assault weapons.