In 845, Emperor Wuzong, a devout Taoist, ordered a general suppression of Buddhism and several other religions. Many Mount Wutai Buddhist monks fled to You Prefecture. Li Deyu, who encouraged Emperor Wuzong to suppress Buddhism, summoned Zhang's emissary at Chang'an and informed him that it would merely damage his relationship with the imperial government if he accepted the Mount Wutai monks. In response, Zhang sent two swords to his commander at Juyong Pass, ordering the commander to behead every monk who came through the pass.