Why did Martin Luther King Jr. write the ‘Letter from Birmingham Jail’?

Martin Luther King Jr. wrote the ‘Letter from Birmingham Jail’ in response to a public statement by eight white Alabama clergymen who criticized King's actions during the Birmingham campaign/protests. The clergymen had called his activities "unwise and untimely" and urged him to end the demonstrations and seek legal channels to bring about change. In his letter, King aimed to address their concerns, defend the strategy and timing of the protests, and articulate the reasons why nonviolent direct action was necessary in the struggle for civil rights. He also sought to raise awareness about the injustices faced by African Americans and call for immediate and comprehensive action to end segregation and racial discrimination.