WASHINGTON — A federal judge in Washington has issued a preliminary injunction that halts enforcement of a provision of the city’s strict gun law. The decision conflicts with a previous judge’s assessment of the law earlier this year.

The ruling from U.S. District Court Judge Richard Leon on Tuesday clashes with a ruling from U.S. District Court Judge Colleen Kollar-Kotelly, who sided with the city in a separate dispute and declined to issue a preliminary injunction. Opponents have appealed that ruling.

The city’s gun law has been the subject of a lengthy legal dispute. Opponents of the law object to a provision that requires people who want to carry a gun in the city to show a “good reason to fear injury” or another “proper reason” to carry the weapon.