During the 20th century, Samarra gained new importance when a permanent lake (Lake Tharthar) was created through the construction of the Samarra Dam, which was built in order to prevent the frequent flooding of Baghdad.