Who Invented Fireworks?

It is widely believed that the Chinese were the first to use fireworks. Fireworks earliest use was in 7th century China as a method to scare off demons.