Cooler weather with higher humidity on Tuesday allowed firefighters to gain better control over wildfires across the state. More than three weeks after 1,781 separate blazes were sparked during a lightning storm, most of them have been extinguished, and some of the biggest fires are nearing containment. The California Department of Forestry and Fire Protection said nearly 300 fires were still burning around the state, most of them in the mountains along the northern edge of the Central Valley. The wildfires since June 21 are one of the largest single fire event in history for California and scorched about 1,300 square miles. The previous record was set in the October 2003, when wildfires burned more than 1,155 square miles. State record-keeping on wildfires began in 1936.